summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/init
diff options
context:
space:
mode:
authorOliver Tappe2007-06-24 14:12:42 +0200
committerOliver Tappe2007-06-24 14:12:42 +0200
commit9ea51ff3a921926264a821f282e60239ac7c5e1b (patch)
tree06378b5852b790c91a84cd2d128720b933fb5aa1 /initramfs/initrd-stuff/init
parentNew busybox in 64bit version (compiled on AMD64 SuSE9.3 system) (diff)
downloadcore-9ea51ff3a921926264a821f282e60239ac7c5e1b.tar.gz
core-9ea51ff3a921926264a821f282e60239ac7c5e1b.tar.xz
core-9ea51ff3a921926264a821f282e60239ac7c5e1b.zip
* implemented support for generating a separate initramfs-setup as part of
the initramfs, machine-setup is now transported via Conf-TGZ only. N.B.: Couldn't apply this to the 4.1.0 branch since init has diverted a little too much for my liking! Will look into this next week. git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1189 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/init')
-rwxr-xr-xinitramfs/initrd-stuff/init23
1 files changed, 10 insertions, 13 deletions
diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init
index ddd57f75..e912864f 100755
--- a/initramfs/initrd-stuff/init
+++ b/initramfs/initrd-stuff/init
@@ -46,9 +46,9 @@ mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev
# configuration settings for this slx system's environment
. /etc/sysconfig/slxsystem.conf 2>/dev/null || ( echo -e ${init_sscf} && \
sleep 100 )
-# machine-setup configuration (common settings for all clients using a
+# initramfs-setup configuration (common settings for all clients using a
# certain InitRamFS generated by slxmkramfs/mkdxsinitrd)
-[ -f /etc/machine-setup ] && . /etc/machine-setup 2>/dev/null
+[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null
export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
export date="${slxconf_date}"
@@ -104,12 +104,17 @@ mdev -s
# switch off the several configuration methods, will be switched on
# according to kernel commandline settings
echo "noldap" > /tmp/ldap-done
-echo "nofile" > /tmp/file-done
+
+# External configuration file retrieval (per tftp) must be done, as otherwise
+# we will never get the machine-setup file. By default, we try a predefined
+# standard path (.../tftpboot/client-config/ ...)
+file="yes"
+
# read kernel commandline
read KCMDLINE < /proc/cmdline
export KCMDLINE
# read the system wide machine-setup and then the kernel commandline
-for opts in $(sed "s/#.*//" /etc/machine-setup) ${KCMDLINE} ; do
+for opts in $(sed "s/#.*//" /etc/initramfs-setup) ${KCMDLINE} ; do
case ${opts} in
# localization
country=*)
@@ -146,18 +151,10 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
ldap="yes"
rm /tmp/ldap-done
;;
- # if (external, via tftp) configuration file retrieval should be
- # triggered, if no source is given try dhcp server and predefined
- # standard path (.../tftpboot/client-config/ ...)
- file)
- file="yes"
- rm /tmp/file-done
- ;;
# file source with tftp server and file location on the server
file=*)
file="yes"
filesrc=${opts#file=}
- rm /tmp/file-done
;;
# if ld.so.cache should be generated; should be switched on when composing
# rootfs from more than one source
@@ -199,7 +196,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup
case $srvproto in
nfs)
# nfsroot consists now of two different parts
- nfspath=/$(uri_token $rootfs path)
+ nfspath=$(uri_token $rootfs path)
nfsserver=$(uri_token $rootfs server)
echo -e "\n# nfs root information gotten via kernel command \
line in $0\n#nfsroot=\"${nfsserver}:${nfspath}\"\n" >> /etc/machine-setup