summaryrefslogtreecommitdiffstats
path: root/initramfs/initrd-stuff/etc
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-10-29 16:56:42 +0100
committerDirk von Suchodoletz2006-10-29 16:56:42 +0100
commit6235099689a961eecf9f72af847c6d5b7c962fd7 (patch)
treeddb25c06fe73e5a9addd0cca623b3549d84f3b6e /initramfs/initrd-stuff/etc
parent* improved error-handling in case of problems with the db-backend. (diff)
downloadcore-6235099689a961eecf9f72af847c6d5b7c962fd7.tar.gz
core-6235099689a961eecf9f72af847c6d5b7c962fd7.tar.xz
core-6235099689a961eecf9f72af847c6d5b7c962fd7.zip
Changed init for using a variable @@@serverip@@@ instead of fixed
defined server ip, introduced a function checkip to translate @@@serverip@@@ into the serverip the client determined itself. That helps in more dynamic environments with servers using more than one ip address. Added a special slx specific configuration file read in stage3 - /etc/sysconfig/slxconfig. For the (deprecated) mkdxsinitrd an ugly hack for creating a general slx config file instead of "patching" the stage3 init is implemented ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@487 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs/initrd-stuff/etc')
-rw-r--r--initramfs/initrd-stuff/etc/functions15
-rw-r--r--initramfs/initrd-stuff/etc/messages6
2 files changed, 18 insertions, 3 deletions
diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions
index 558c7fbb..95de2ac7 100644
--- a/initramfs/initrd-stuff/etc/functions
+++ b/initramfs/initrd-stuff/etc/functions
@@ -274,6 +274,17 @@ case $ipcfg in
esac
}
#######################################################################
+# replace @@@serverip@@@ with real serverip
+checkip ()
+{
+if [ "@@@serverip@@@" = "$1" -a -n "$serverip" ] ; then
+ echo $serverip
+else
+ echo $1
+fi
+}
+
+#######################################################################
# nfs mounter for root filesystem and other sources
nfsmnt ()
{
@@ -557,10 +568,12 @@ waitfor /tmp/file-done 10000 || error "$error_errfcfg" nonfatal
waitfor /tmp/ldap-done 10000 || error "$error_errlcfg" nonfatal
# concat the different files now into the central config file, order
# matters - ldap data has highest priority
-if ! [ -f /tmp/cfgcomplete ] ; then
+if ! test -f /tmp/cfgcomplete ; then
for config in /tmp/confviadhcp /tmp/confviafile /tmp/confvialdap
do test -f $config && cat $config >> /etc/machine-setup
done
+# check if serverip is set as variable @@@serverip@@@
+sed "s,@@@serverip@@@,$serverip," -i /etc/machine-setup
echo "config completed" > /tmp/cfgcomplete
fi
}
diff --git a/initramfs/initrd-stuff/etc/messages b/initramfs/initrd-stuff/etc/messages
index b1338776..2136cc0f 100644
--- a/initramfs/initrd-stuff/etc/messages
+++ b/initramfs/initrd-stuff/etc/messages
@@ -2,7 +2,7 @@
# bootup (within initialramfs) for OpenSLX linux diskless clients version 4
# this file could be used for localization of error messages
#
-# Dirk von Suchodoletz <dvs@openslx.com>, 05-09-2006
+# Dirk von Suchodoletz <dvs@openslx.com>, 29-10-2006
#
# (c) 2006 - RZ Universitaet Freiburg
# (c) 2006 - OpenSLX.org
@@ -12,7 +12,9 @@ init_errmsg="functions file contains a lot of script \
functionality. Without this\ninit script will not run."
init_mff="The main $init_errmsg"
init_dff="The distro $init_errmsg"
-init_dscf="The distribution specific configuration file could not be found"
+init_dscf="The distribution specific configuration file could not be found."
+init_sscf="The slx configuration variables could not be found. Please
+provide the slxconfig file."
init_errip=" Unable to setup at \
least basic functionality, because no IP configuration\n available. You \
might pass that information via kernel command line\n through setting of \