summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/bin
diff options
context:
space:
mode:
authorDirk von Suchodoletz2009-08-15 17:55:04 +0200
committerDirk von Suchodoletz2009-08-15 17:55:04 +0200
commitc09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40 (patch)
treead40efbc1fcb79c76718d77773cb412e4a04b937 /initramfs/stage3-stuff/bin
parentSome trivial stuff ... (diff)
downloadcore-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.tar.gz
core-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.tar.xz
core-c09bfd119f2ed3f1edf1bfbdf7a0beb1b2abea40.zip
Re-enabling the functionality to boot from a local block device (mainly
USB sticks). It allows for demonstration purposes and special setups to have the base filesystem locally (see related #156). git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3092 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/stage3-stuff/bin')
-rwxr-xr-xinitramfs/stage3-stuff/bin/dhcpmkconfig3
-rwxr-xr-xinitramfs/stage3-stuff/bin/hwautocfg5
2 files changed, 8 insertions, 0 deletions
diff --git a/initramfs/stage3-stuff/bin/dhcpmkconfig b/initramfs/stage3-stuff/bin/dhcpmkconfig
index 87e48683..c8c4d40c 100755
--- a/initramfs/stage3-stuff/bin/dhcpmkconfig
+++ b/initramfs/stage3-stuff/bin/dhcpmkconfig
@@ -23,6 +23,9 @@
echo -e "# network configuration written by $0:" >/tmp/confviadhcp
unset HOME IFS KCMDLINE DEBUGLEVEL MODPRV TERM BOOTIF BOOT_IMAGE \
infomsg mask lease interface cfgmsg cfgfile boot_file no_bootsplash
+# set the broadcast address if not delivered by dhcp
+[ -z "$broadcast" ] && \
+ broadcast=$(ipcalc -b $ip/$subnet|sed s/.*=//)
set | sed \
-e "s,^P.*,,;s,ntpsrv,ntp_servers,;s,ip,clientip," \
-e "s,serverid,serverip,;s,subnet,subnet_mask," \
diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg
index 40b9e38c..d332e36b 100755
--- a/initramfs/stage3-stuff/bin/hwautocfg
+++ b/initramfs/stage3-stuff/bin/hwautocfg
@@ -39,6 +39,11 @@ ash /etc/modprobe.base; mdev -s
( usleep 100000 ; hwinfo --bios >/etc/hwinfo.bios ) &
# for mounting partitions/devices with the "auto" option
echo -e "ext3\next2\nreiserfs\nxfs\njfs\next4\nvfat" >/etc/filesystems
+# request a local block device for config and root filesystem (lbd://)
+if grep -iq '"lbd://' /proc/cmdline /etc/initramfs-setup; then
+ modprobe -a ${MODPRV} usb-storage sd_mod
+ mdev -s
+fi
return 0
}