summaryrefslogtreecommitdiffstats
path: root/initramfs
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
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')
-rwxr-xr-xinitramfs/initrd-stuff/init23
-rwxr-xr-xinitramfs/mkdxsinitrd46
2 files changed, 18 insertions, 51 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
diff --git a/initramfs/mkdxsinitrd b/initramfs/mkdxsinitrd
index 6d73bd1b..783bcdcb 100755
--- a/initramfs/mkdxsinitrd
+++ b/initramfs/mkdxsinitrd
@@ -71,9 +71,9 @@ usage()
{
echo -e "mkdxsinitrd [-dh] [-k kernel version] [-i path/file] \
[-f module(s)] [-n module(s)] [-m module(s)] -r path [-s theme]\n\
-[-c machine-setup] -S system_name"
+[-c initramfs-setup] -S system_name"
echo "OPTIONEN"
- echo " -c location of client configuration file (machine-setup)"
+ echo " -c location of initramfs configuration file (initramfs-setup)"
echo " -d use ISC dhclient instead of udhcpcd of busybox"
echo " -h show usage information"
echo " -k kernel version"
@@ -323,7 +323,7 @@ while getopts :dhk:c:i:r:o:s:f:n:m:S:tu:wI:a: a ; do
case $a in
\:|\?)
case $OPTARG in
- c) echo "-c requires location of machine-setup file";;
+ c) echo "-c requires location of initramfs-setup file";;
k) echo "-k requires kernel version parameter";;
i) echo "-i requires initramfs path parameter";;
f) echo "-f requires file system module (list) parameter";;
@@ -643,44 +643,14 @@ cp ${ROOTDIR}/lib/modules/${KERNVER}/modules.* \
# add the common default client configuration file - just to ensure to
# have all major variables defined. !!These settings are most probably
-# are overwritten by fileget in stage3 within initramfs!!
-# fixme! it should be possible to provide the filename and location via
-# parameter
-echo "## common settings of machine-setup for clients sharing an InitRamFS" \
- > ${INSTDIR}/etc/machine-setup
+# overwritten by fileget in stage3 within initramfs!!
+echo "## common settings for clients sharing an InitRamFS" \
+ > ${INSTDIR}/etc/initramfs-setup
if [ -n "${CLCONFFILE}" ] ; then
- cat ${CLCONFFILE} >>${INSTDIR}/etc/machine-setup
+ cat ${CLCONFFILE} >>${INSTDIR}/etc/initramfs-setup
echo "Using ${CLCONFFILE}"
-elif [ -f ${SLX_PRIVATE_PATH}/config/default/initramfs/machine-setup ] ; then
- cat ${SLX_PRIVATE_PATH}/config/default/initramfs/machine-setup \
- >>${INSTDIR}/etc/machine-setup
- echo "Using ${SLX_PRIVATE_PATH}/config/default/initramfs/machine-setup"
-# use the installed default machine-setup.default
-elif [ -f ${SLX_SHARE_PATH}/templates/machine-setup.default ] ; then
- cat ${SLX_SHARE_PATH}/templates/machine-setup.default \
- >>${INSTDIR}/etc/machine-setup
- echo "Using ${SLX_SHARE_PATH}/templates/machine-setup.default"
-# just compatibility for older versions
-elif [ -f /etc/dxs/client.cfg/machine-setup.default ] ; then
- cat /etc/dxs/client.cfg/machine-setup.default \
- >>${INSTDIR}/etc/machine-setup
- echo "Using /etc/dxs/client.cfg/machine-setup.default"
-# fixme: dirty hack if the installer does not creates a normal file
-elif [ -f /etc/dxs/client.cfg/machine-setup.default.new ] ; then
- cat /etc/dxs/client.cfg/machine-setup.default.new \
- >>${INSTDIR}/etc/machine-setup
-elif [ -f ../installer/default_files/machine-setup.default ] ; then
- cat ../installer/default_files/machine-setup.default \
- >>${INSTDIR}/etc/machine-setup
- echo "Warning: Using ../installer/default_files/machine-setup.default"
-else
- #inserted password for root for debugging purposes
- # fixme - set more default values?!
- echo -e "# default for machine-setup does not exist\n# root logins are \
-disabled\nroot_pw='"'$1$T7VD/mmQ$aCP1WEaWplEsHe9khv4kK.'"'" \
- >>${INSTDIR}/etc/machine-setup
fi
-echo "## end of common machine-setup" >>${INSTDIR}/etc/machine-setup
+echo "## end of common initramfs-setup" >>${INSTDIR}/etc/initramfs-setup
# custom hardware configuration files pcitable.local and Cards.local
# fixme!! New source for these files (instead of templates)!