From 298c5df775c45a44d79fbea9c33f9c53e027fc8d Mon Sep 17 00:00:00 2001 From: Dirk von Suchodoletz Date: Tue, 11 Aug 2009 13:50:03 +0000 Subject: Some experimental stuff (dont use yet) ... git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@3073 95ad53e4-c205-0410-b2fa-d234c58c8868 --- initramfs/stage3-stuff/bin/hwautocfg | 16 ++++++++-------- initramfs/stage3-stuff/bin/servconfig | 26 ++++++++++++-------------- 2 files changed, 20 insertions(+), 22 deletions(-) (limited to 'initramfs/stage3-stuff/bin') diff --git a/initramfs/stage3-stuff/bin/hwautocfg b/initramfs/stage3-stuff/bin/hwautocfg index 0d6f162a..40b9e38c 100755 --- a/initramfs/stage3-stuff/bin/hwautocfg +++ b/initramfs/stage3-stuff/bin/hwautocfg @@ -147,18 +147,18 @@ noexec\t 0 0" >>/tmp/fstab # if more than one id45 present, the latter ones are simply mounted # over the previous (the mounts are postponed a bit via do_mnt to # have the filesystem completely prepared) - echo -e "waitfor $hdpartnr 4000\n\ - mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*}\n\ + echo -e "waitfor ${hdpartnr} 4000\n\ + mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*}\n\ ln -sf /media/${hdpartnr#/dev/*} /mnt/var/scratch" >>/etc/do_mnt - echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\ + echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto\ \t\t 0 0" >>/tmp/fstab elif [ ${partid} -eq 46 ] ; then # mount a home directory to (/mnt)/var/home - echo -e "waitfor $hdpartnr 4000\n\ - mount -t auto $hdpartnr /mnt/media/${hdpartnr#/dev/*} \n\ + echo -e "waitfor ${hdpartnr} 4000\n\ + mount -t auto ${hdpartnr} /mnt/media/${hdpartnr#/dev/*} \n\ test -d /mnt/media/${hdpartnr#/dev/*}/home && \ ln -sf /media/${hdpartnr#/dev/*} /mnt/var/home" >>/etc/do_mnt - echo -e "$hdpartnr\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\ + echo -e "${hdpartnr}\t/media/${hdpartnr#/dev/*}\tauto\t\tnoauto,\ \t 0 0" >>/tmp/fstab fi done @@ -179,7 +179,7 @@ fi finish () { mdev -s # mount filesystem parts (if any) requested in disk setup -[ -f /etc/do_mnt ]] && ash /etc/do_mnt & +[ -f /etc/do_mnt ] && ash /etc/do_mnt & # remove unneeded disk and mouse drivers [ ! -s /etc/hwinfo.disk ] && rmmod sd_mod 2>/dev/null #grep -q " PS/2 " /etc/hwinfo.mouse || \ @@ -230,7 +230,7 @@ case $1 in # if required and mounting) disk) # if disk action is not disabled (see #470) - disk + [ "x${hw_local_disk}" != "xno" ] && disk ;; # remove unneeded kernel modules finish) diff --git a/initramfs/stage3-stuff/bin/servconfig b/initramfs/stage3-stuff/bin/servconfig index b44d57cf..dcadc70a 100755 --- a/initramfs/stage3-stuff/bin/servconfig +++ b/initramfs/stage3-stuff/bin/servconfig @@ -112,24 +112,24 @@ echo -e "# /etc/hosts - file generated by $0 during OpenSLX stage3\ fe00::0\t\tipv6-localnet\nff00::0\t\tipv6-mcastprefix\nff02::1\ \t\tipv6-allnodes\nff02::2\t\tipv6-allrouters\nff02::3\t\t\ ipv6-allhosts\n" >/mnt/etc/hosts -if [ -n "$domain_name" ]; then - echo -en "$clientip\t" >>/mnt/etc/hosts - for name in $domain_name; do - echo -en "$host_name.$name " >>/mnt/etc/hosts +if [ -n "${domain_name}" ]; then + echo -en "${clientip}\t" >>/mnt/etc/hosts + for name in ${domain_name}; do + echo -en "${host_name}.${name} " >>/mnt/etc/hosts done - echo -e "$host_name" >>/mnt/etc/hosts + echo -e "${host_name}" >>/mnt/etc/hosts else - echo -e "$clientip\t$host_name" >>/mnt/etc/hosts + echo -e "${clientip}\t${host_name}" >>/mnt/etc/hosts fi # set up domainname and resolving rm -rf /mnt/etc/resolv.conf -test -n "$domain_name" && \ +test -n "${domain_name}" && \ echo -e "# /etc/resolv.conf - file generated by\n#\t$0:\n\ -#\t$date\n#options timeout:1 attempts:1 rotate\n\ -search "$domain_name >/mnt/etc/resolv.conf -test -n "$domain_name_servers" && { - for name in $domain_name_servers; do - echo nameserver $name >>/mnt/etc/resolv.conf; +#\t${date}\n#options timeout:1 attempts:1 rotate\n\ +search "${domain_name} >/mnt/etc/resolv.conf +test -n "${domain_name_servers}" && { + for name in ${domain_name_servers}; do + echo nameserver ${name} >>/mnt/etc/resolv.conf; done; } ############################################################################# @@ -145,8 +145,6 @@ config_atd # configuration of cron services - calling distro specific function # config_cron (runlevel links, directories, ...) config_cron -[ "x$crontab_entries" != "x" ] && \ - echo -e "$crontab_entries" >> /mnt/etc/crontab # setup system log services - distro dependent function config_syslog config_syslog -- cgit v1.2.3-55-g7522