From 6a27eb2c90a35c655896a73ebd2bd57977ce8a54 Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Sun, 30 Sep 2007 22:42:49 +0000 Subject: Set of cleanups and minor fixes ... git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1361 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/initrd-stuff/etc/functions | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) (limited to 'initramfs/initrd-stuff/etc/functions') diff --git a/initramfs/initrd-stuff/etc/functions b/initramfs/initrd-stuff/etc/functions index 8b4a0ee5..5a65ff88 100644 --- a/initramfs/initrd-stuff/etc/functions +++ b/initramfs/initrd-stuff/etc/functions @@ -202,7 +202,7 @@ local program="$1" local s4path local notfound=1 for s4path in bin sbin usr/bin usr/sbin usr/local/bin \ - usr/local/sbin usr/bin/X11; do + usr/local/sbin usr/bin/X11; do if [ -f "/mnt/$s4path/$program" ] && \ [ -x "/mnt/$s4path/$program" ]; then printf '%s\n' "/$s4path/$program" @@ -214,7 +214,7 @@ return $notfound } ############################################################################# # disk formatter and mounter. some proper error message output should be -# added +# added. It uses programs invoked from stage 4 root filesystem diskfm () { local target=$1 local fs @@ -319,7 +319,7 @@ case $dhcp in udhcpc -b -q $vci -s /usr/share/udhcpc/default.script -i $nwif 2>/dev/null ;; esac -echo "dhcp finished at $(sysup)" > /tmp/dhcp-done +echo "dhcp finished at $(sysup)" >/tmp/dhcp-done } ############################################################################# @@ -343,7 +343,7 @@ else fi } fileget () { -# get type of tftp available, alternatively use wget for ftp or http +# normally tftp would be used, alternatively use wget for ftp or http # if local device file is specified - mount and unmount after copying local cfgfile [ "x$fileprot" = "x" ] && fileprot=tftp @@ -372,8 +372,8 @@ if [ "x$filepath" != "x" ] ; then esac else # predefined value for openslx environment; it is expected that this - # directory is just below the tftpboot/tftproot (path to which the - # daemon is restricted to) + # directory is just below the tftpboot (path to which the daemon is + # restricted to) filepath="client-config" [ "x$fileserv" = "x" ] && fileserv=$(checkip ${serverip}) # try to get configuration files successively; start with distro client @@ -457,7 +457,7 @@ strinstr (){ } ############################################################################# -# simple string in file search +# simple string in file search, for the future grep should be used instead strinfile (){ case "$(cat $2)" in *$1*) return 0;; esac return 1 @@ -499,7 +499,7 @@ for ldcfg in /mnt/sbin/ldconfig \ test -x $ldcfg && { $ldcfg -r /mnt -C $cachefile; break; } done -echo "finished at $(sysup)" > /tmp/ldcfg +echo "finished at $(sysup)" >/tmp/ldcfg } ############################################################################# @@ -529,7 +529,7 @@ waitfor /tmp/dhcp-done 10000 || error "$error_errdcfg" nonfatal waitfor /tmp/file-done 10000 || error "$error_errfcfg" nonfatal waitfor /tmp/ldap-done 10000 || error "$error_errlcfg" nonfatal # concatenate the different files now into the central config file, order -# matters - ldap data has highest priority +# matters - ldap (not implemented yet) data has highest priority if ! test -f /tmp/cfgcomplete ; then for config in /etc/initramfs-setup /tmp/confviadhcp /tmp/confviafile \ /tmp/confvialdap @@ -882,10 +882,12 @@ include_in_fsroot_union () { esac if [ "X$union_type" == "XUnionFS" ]; then [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && \ - echo "Using unionctl to mount ${root_path}_${union_id} (type: $union_type)" + echo "Using unionctl to mount ${root_path}_${union_id} (type: \ + $union_type)" unionctl /mnt/ --add --after 1 --mode ro /mnt/tmp/${root_path}_${union_id} elif [ "X$union_type" == "XAUFS" ]; then - # unionctl for aufs is a sh script needing tools not included in our initrd + # unionctl for aufs is a sh script needing tools not included in our + # initramfs [ "$DEBUGLEVEL" -gt 2 -a "$DEBUGLEVEL" != 8 ] && \ echo "Using aufs-mount to mount ${root_path}_${union_id} (type: $union_type)" mount -n -o remount,add:1:/mnt/tmp/${root_path}_${union_id}=ro none /mnt @@ -993,8 +995,8 @@ WallpaperMode=NoWallpaper" \ ############################################################################# # dummy functions - avoid undefined functions in servconfig (functions are -# normally overwritten by settings within distro-functions - a file generated -# by slxmkramfs from /functions-default & ~-version +# normally overwritten by settings within distro-functions) - a file +# generated by mkdxsinitrd from /functions-default & ~-version # find out if prerequisites for special X server modules are met (distro # specific) and enable tvout if required -- cgit v1.2.3-55-g7522