diff options
| author | Dirk von Suchodoletz | 2007-02-01 01:01:15 +0100 |
|---|---|---|
| committer | Dirk von Suchodoletz | 2007-02-01 01:01:15 +0100 |
| commit | 4e049941fd73ccd651c417a722d7099de1e0ef67 (patch) | |
| tree | 6779ae7a6dd9ef62d94a0489d98d99ec556535b3 /initramfs | |
| parent | mksquashfs (regex) filters patch (to be tested, see #86) ... (diff) | |
| download | core-4e049941fd73ccd651c417a722d7099de1e0ef67.tar.gz core-4e049941fd73ccd651c417a722d7099de1e0ef67.tar.xz core-4e049941fd73ccd651c417a722d7099de1e0ef67.zip | |
Some thoughts on Gentoo integration ... (minor cleanups in init
and servconfig)
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@664 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
| -rw-r--r-- | initramfs/distro-specs/gentoo/functions-default | 49 | ||||
| -rwxr-xr-x | initramfs/initrd-stuff/bin/servconfig | 6 | ||||
| -rwxr-xr-x | initramfs/initrd-stuff/init | 2 |
3 files changed, 35 insertions, 22 deletions
diff --git a/initramfs/distro-specs/gentoo/functions-default b/initramfs/distro-specs/gentoo/functions-default index 3f6eafd8..d926ed17 100644 --- a/initramfs/distro-specs/gentoo/functions-default +++ b/initramfs/distro-specs/gentoo/functions-default @@ -1,18 +1,24 @@ -# configuration script for Gentoo linux distribution to configure OpenSLX -# linux diskless clients (executed within initialramfs after genconfig) +# Copyright (c) 2003 - 2006 - RZ Uni Freiburg +# Copyright (c) 2006, 2007 - OpenSLX GmbH +# +# This program/file is free software distributed under the GPL version 2. +# See http://openslx.org/COPYING # -# Dirk von Suchodoletz <dirk@goe.net>, 08-07-2006 +# If you have any feedback please consult http://openslx.org/feedback and +# send your feedback to feedback@openslx.org # -# (c) 2006 - RZ Universitaet Freiburg -# (c) 2006 - OpenSLX.ORG Project +# General information about OpenSLX can be found under http://openslx.org +# +# configuration script for Gentoo linux distribution to configure OpenSLX +# linux diskless clients (executed within initialramfs after genconfig) # empty functions are defined at the beginning of /etc/functions # distro specific general function called from servconfig script config_distro () { -echo -e "dxs version 4.0a\ninitramfs generation date $date" \ +echo -e "OpenSLX version 4.0.6a\ninitramfs generation date $date" \ >> /mnt/etc/gentoo-release -echo -e "# changes made to this file by $0 (initrd from $date)" \ +echo -e "# changes made to this file by $0 (initramfs from $date)" \ > /etc/rc.conf # keytable is set by hwautocfg script (added just for convenience here) config_rc_entry "KEYMAP" "${KEYTABLE}" @@ -33,26 +39,35 @@ fi # linking runlevel scripts rllinker () { local script="$1" -local need="$2" +local after="$2" # empty runlevel links - decision on running certain services is # passed via configuration ln -s /etc/${D_INITDIR}/$1 /mnt/etc/runlevels/default/$1 -echo $1 >> /mnt/etc/runlevels/default/.critical -# hack to remove unneeded dependency stuff -#if [ "$script" != "vmware-prep" ] ; then -# sed "/depend/,/}/d" /mnt/etc/${D_INITDIR}/$1 > /etc/rls -# cp /etc/rls /mnt/etc/${D_INITDIR}/$1 -#fi +#echo $1 >> /mnt/etc/runlevels/default/.critical +# same stuff as within initial_boot +# [ -n "$after" ] && } # setup initial boot scripts (rather strange concept I did not get # completely) initial_boot () { -rm /mnt/etc/runlevels/*/.critical 2>/dev/null +#rm /mnt/etc/runlevels/*/.critical 2>/dev/null for i in ${D_INITSCRIPTS}; do ln -sf /etc${D_INITDIR}/$i /mnt/etc/${D_INITBOOTD}/$i - echo $i >> /mnt/etc/${D_INITBOOTD}/.critical - echo $i >> /mnt/etc/runlevels/default/.critical + # to get a certain order of scripts the after token of depends () might be + # used + # [ -n "$after" ] && \ + # sedscript: + #/depend/,/}/{ + #/^ /d + #/depend/a\ + #\tafter $bla + #} + #after=$i + #sed -f sedscript -i /etc${D_INITDIR}/$i + # not needed any more + #echo $i >> /mnt/etc/${D_INITBOOTD}/.critical + #echo $i >> /mnt/etc/runlevels/default/.critical done } diff --git a/initramfs/initrd-stuff/bin/servconfig b/initramfs/initrd-stuff/bin/servconfig index cbe7b187..43ed0796 100755 --- a/initramfs/initrd-stuff/bin/servconfig +++ b/initramfs/initrd-stuff/bin/servconfig @@ -347,8 +347,7 @@ Type=Application" >/mnt/etc/X11/sessions/default.desktop for i in /mnt/var/lib/vmware/vmsessions/*.desktop; do # only link if in right slxgrp slxgrpstr=$(sed \ - 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;/slxgrp=/!d' ${i} \ - | sed '$!d;s/slxgrp=//') + 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/;/slxgrp=/!d' \ ${i} | sed '$!d;s/slxgrp=//') slxgrptest="false" # FIXME: maybe logfile sometime ;) #echo "=${slxgrpstr}=" @@ -424,7 +423,6 @@ if [ -n "$scratch" -a -z "$tmpisdisk" ] ; then ;; esac fi -chmod 1777 /mnt/tmp ############################################################################# # X11/GUI stuff @@ -438,7 +436,7 @@ if [ "x$start_x" != "xno" ] ; then /var/run/xdmctl \ /tmp/.ICE-unix \ /tmp/.X11-unix ; do testmkd /mnt/$i; done - chmod a+rwxt /mnt/tmp/.ICE-unix /mnt/tmp/.X11-unix + chmod 1777 /mnt/tmp/.ICE-unix /mnt/tmp/.X11-unix echo "# file emtied by $0 during initramfs" > /mnt/etc/X11/xdm/Xservers # define additional sessions offered to the user (via dhcp/ldap config) # descsession -> deprecated by new vmware integration concept diff --git a/initramfs/initrd-stuff/init b/initramfs/initrd-stuff/init index 44db70e9..797d1c82 100755 --- a/initramfs/initrd-stuff/init +++ b/initramfs/initrd-stuff/init @@ -627,7 +627,7 @@ sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab # preparations to leave initramfs - umounting ... umount -n /sys || error "$init_errsys" nonfatal umount -n /proc/bus/usb >/dev/null 2>&1 -chmod a+rwxt /mnt/dev/shm /mnt/tmp /mnt/tmp/scratch 2>/dev/null +chmod 1777 /mnt/dev/shm /mnt/tmp /mnt/tmp/scratch 2>/dev/null mount -n --move /dev /mnt/dev # stop udevd (non-busybox udevs) |
