diff options
author | Dirk von Suchodoletz | 2006-06-25 22:31:15 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-06-25 22:31:15 +0200 |
commit | 70ee8e665a76b8868b0affed3a4efd2f51757cf2 (patch) | |
tree | 785770b86e693fe359fa7a4523a2fa55fb2d43f1 /initrd/initrd-stuff | |
parent | Massive changes for distro specific configurations (mkdxsinitrd, (diff) | |
download | core-70ee8e665a76b8868b0affed3a4efd2f51757cf2.tar.gz core-70ee8e665a76b8868b0affed3a4efd2f51757cf2.tar.xz core-70ee8e665a76b8868b0affed3a4efd2f51757cf2.zip |
Added descriptions, some cleanups, ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@250 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/initrd-stuff')
-rwxr-xr-x | initrd/initrd-stuff/bin/servconfig | 26 | ||||
-rw-r--r-- | initrd/initrd-stuff/etc/messages | 13 | ||||
-rwxr-xr-x | initrd/initrd-stuff/init | 27 |
3 files changed, 40 insertions, 26 deletions
diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index f27c4055..5dc1f3ff 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -1,8 +1,8 @@ #!/bin/sh # # Description: universal (distro independent) configuration script -# for linux diskless clients (executed within initial -# ramdisk) +# for linux diskless clients (executed within initial +# ramdisk) # # Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-06-2006 # Michael Janczyk, 31-05-2006 @@ -10,6 +10,7 @@ # Oliver Tappe, 23-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg +# (c) 2006 - odlx.org project # # Version: 0.1.1e @@ -47,13 +48,13 @@ while [ $len -le 8 ] ; do done echo " WELCOME TO \n (\l) - __ __ ___ __ __ __ __ __ __ - | | | || | || | | || |_| | | | - | | | || || | | | / |__| - | |___ | || | || |_| | / _ __ - |______||__||__| |__| _____/ |__| |__| |__| + _____ ____ __ __ __ + / _ \ | _ \ | | | |_| | + | | | | | | | | | | \ / + | |_| | | |_| | | |___ / _ \ + \_____/ |_____/ |______| |__| |__| - Diskless Workstation (v4.0/$dstr (c) <dirk@goe.net> + Diskless Workstation (v4.0/$dstr (c) <odlx project> ">/mnt/etc/issue ####################################################################### @@ -225,11 +226,12 @@ fi # copy timezone file defined with language settings [ -z "$TZ" ] && TZ="$timezone" cp /mnt/usr/share/zoneinfo/${TZ} /mnt/etc/localtime 2>/dev/null || \ - error " No such timezone data file (needed for ntp time service \ -configuration)." nonfatal + error "$scfg_ntptz" nonfatal config_ntp -# secure shell server +# secure shell server - at the moment all clients share one "secret" +# key or the key has to be regenerated on every bootup or fetched on +# every bootup from somewhere config_sshd # simple network management protocol agent @@ -323,6 +325,8 @@ fi ####################################################################### # preparation of /tmp directory (partition 44, nfs scratch, ramdisk) +# there might be the chance that we have a disk partition available, so +# wait for completion of detection, setup process waitfor /tmp/tmpready 10000 # create some directories and correct permissions tmpisdisk=`sed -n '/\/tmp/p' /mnt/etc/fstab` diff --git a/initrd/initrd-stuff/etc/messages b/initrd/initrd-stuff/etc/messages index 8e319d19..9876a208 100644 --- a/initrd/initrd-stuff/etc/messages +++ b/initrd/initrd-stuff/etc/messages @@ -1,11 +1,12 @@ -# Description: messages file for all error and info messages generated during -# bootup (within initialramfs) for linux diskless clients -# version 4 -# this file could be used for localization of error messages +# Description: messages file for all error and info messages generated +# during client bootup (within initialramfs) for linux +# diskless clients of version 4 +# this file could be used for localization of error messages # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 01-06-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg +# (c) 2006 - odlx.org project # # Version: 0.0.3f @@ -136,6 +137,8 @@ scfg_errdcfg=" Did not get any configuration data via dhcp until now ..." scfg_errfcfg=" Did not get any configuration data via tftp until now ..." scfg_errlcfg=" Did not get any configuration data via ldap until now ..." scfg_nfs=" Mount of some NFS source failed ..." +scfg_ntptz=" No such timezone data file (needed for ntp time service \ +configuration)." scfg_vmdir=" For some reason the runvmware script is not available for \ copying. That\n could be the result of failed mount or simply missing \ file on\n server." diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index 3a9e4a11..2d16d655 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -1,12 +1,13 @@ #!/bin/sh # Description: main script for new type of initial ramdisk for -# linux diskless clients version 4 +# linux diskless clients version 4 # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 28-05-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg -# -# Version: 0.2.4i +# (c) 2006 - odlx.org project +# +# Version: 0.2.4j # functions common for all distros, messages contains all error and info # output @@ -27,14 +28,17 @@ export DISTRO="@@@DISTRO@@@" # do not use dnbd cache file nodnbdcache="yes" +# device files get their own filesystem (to be move mounted later) DEVDIR="/dev" mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${DEVDIR} +# copy basic device files into dev (later udev will handle that) cp -a /tmp/null /tmp/console /dev mkdir -p ${DEVDIR}/pts mkdir -p ${DEVDIR}/shm mkdir -p ${DEVDIR}/.udevdb +# mount the important standard directories [ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc echo 256 > /proc/sys/kernel/real-root-dev [ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys @@ -42,14 +46,15 @@ echo 256 > /proc/sys/kernel/real-root-dev # redirect console (after /dev/console is available, and /dev mounted) exec < /dev/console > /dev/console 2>&1 -# run pre init script +# run pre init script and user defined preinit.local (see Howto) preinit [ -x /bin/preinit.local ] && /bin/preinit.local # start device auto discovery service - distro specific function udev_hotplug -# set defaults and create waitfor files +# set defaults and create special files so that "waitfor" does not waites +# for a configuration option TMPFSSIZE="50%" COWSIZE="50%" RWDIR=/dev/shm @@ -96,7 +101,8 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup ;; # if (external, via tftp) configuration file retrieval should # be triggered, if no source is given try dhcp server and - # predefined standard path + # predefined standard path (~/tftpboot/client-conf/default, + # client-conf/<name-of-export>/default, ...) file) FILE="yes" rm /tmp/file-done @@ -115,7 +121,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup UNIONFS=1 UNIONDIRS=${opts#union=} ;; - # if unionfs should be used + # if unionfs should be used over the complete root filesystem unionfs) UNIONFS=1;; # if cowloop should be used, only ontop of network block device and in @@ -124,7 +130,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup COWLOOP=1 #COWSIZE=${opts#cowloop=} ;; - # dnbd server:port + # dnbd server:port,filesystem (filesystem is optional) dnbdroot=*) NBD=dnbd # name of kernel module NBDOPT=${opts#dnbdroot=} @@ -149,7 +155,8 @@ nfsroot=\"${NFSROOT}\"\n" >> /etc/machine-setup # size of tempfs if not max. 50% of RAM should be used tmpfssize=*) TMPFSSIZE=${opts#tmpfssize=};; - # vendor code identifier for dhcp requests + # vendor code identifier for dhcp requests, that way odlx clients could + # be distinguished from other (dhcp) clients vci=*) VCI=${opts#vci=};; esac |