diff options
author | Dirk von Suchodoletz | 2006-03-25 01:44:23 +0100 |
---|---|---|
committer | Dirk von Suchodoletz | 2006-03-25 01:44:23 +0100 |
commit | 58f6fae954426db04c221be1377786afdccea3f7 (patch) | |
tree | f52d890438648bad9295e7614f6bc9a50620f150 /initrd/distro-specs | |
parent | integration of vmware module. hw modules to ignore for loading ... (diff) | |
download | core-58f6fae954426db04c221be1377786afdccea3f7.tar.gz core-58f6fae954426db04c221be1377786afdccea3f7.tar.xz core-58f6fae954426db04c221be1377786afdccea3f7.zip |
move vm-mount into InitRD, heavy cleanups in initial ramdisk
environment, ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@127 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/distro-specs')
-rw-r--r-- | initrd/distro-specs/debian/functions-3.1 | 14 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-10.0 | 18 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-10.1 | 18 | ||||
-rw-r--r-- | initrd/distro-specs/suse/functions-9.3 | 101 | ||||
-rw-r--r-- | initrd/distro-specs/ubuntu/functions-5.10 | 34 |
5 files changed, 71 insertions, 114 deletions
diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1 index cb92ffa2..9037bc84 100644 --- a/initrd/distro-specs/debian/functions-3.1 +++ b/initrd/distro-specs/debian/functions-3.1 @@ -30,15 +30,11 @@ for i in rc3.d/K$stop$script rc5.d/K$stop$script \ done } -# extended system users -extpasswd () { -echo -e "daemon:x:1:1:daemon:/usr/sbin:/bin/sh\nbin:x:2:2:bin:/bin:\n\ -/bin/sh\nsys:x:3:3:sys:/dev:/bin/sh\nman:x:6:12:man:/var/cache/man:/bin/sh\n\ -sshd:x:100:65534::/var/run/sshd:/bin/false\nnobody:x:65534:65534:nobody:\n\ -/nonexistent:/bin/sh" >> /mnt/etc/passwd -echo -e "daemon:*:13021:0:99999:7:::\nbin:*:13021:0:99999:7:::\n\ -sys:*:13021:0:99999:7:::\nman:*:13021:0:99999:7:::sshd:!:13021:0:99999:7:::\n\ -nobody:*:13021:0:99999:7:::" >> /mnt/etc/shadow +# make a runlevel script +d_mkrlscript () { +local switch=$1 +local name=$2 +local info=$3 } # group of functions for the normal runlevels - first parameter is start diff --git a/initrd/distro-specs/suse/functions-10.0 b/initrd/distro-specs/suse/functions-10.0 index 881378bb..a4220542 100644 --- a/initrd/distro-specs/suse/functions-10.0 +++ b/initrd/distro-specs/suse/functions-10.0 @@ -51,11 +51,15 @@ local start="05" local stop="18" if [ "x$start_dreshal" = "xyes" ]; then if [ -f /mnt/etc/init.d/dbus ] ; then - strinfile "messagebus:" /mnt/etc/passwd || \ - echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ - >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/passwd || \ + echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ + >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/group || \ + echo "messagebus:!:101:" >> /mnt/etc/group testmkd /mnt/var/run/dbus - # chown 100:101 /mnt/var/run/dbus + # set permissions with userid + echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld rllinker "dbus" "$start" "$stop" fi if [ -f /mnt/etc/init.d/resmgr ] ; then @@ -68,6 +72,12 @@ if [ "x$start_dreshal" = "xyes" ]; then strinfile "haldaemon:" /mnt/etc/passwd || \ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ >> /mnt/etc/passwd + strinfile "haldaemon:" /mnt/etc/group || \ + echo "haldaemon:!:103:" >> /mnt/etc/group + testmkd /mnt/var/run/hal + # set permissions with userid + echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld start="0"`expr $start + 1` stop="0"`expr $start - 1` rllinker "haldaemon" "$start" "$stop" diff --git a/initrd/distro-specs/suse/functions-10.1 b/initrd/distro-specs/suse/functions-10.1 index bfce77ff..a41cd223 100644 --- a/initrd/distro-specs/suse/functions-10.1 +++ b/initrd/distro-specs/suse/functions-10.1 @@ -65,11 +65,15 @@ local start="05" local stop="18" if [ "x$start_dreshal" = "xyes" ]; then if [ -f /mnt/etc/init.d/dbus ] ; then - strinfile "messagebus:" /mnt/etc/passwd || \ - echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ - >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/passwd || \ + echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ + >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/group || \ + echo "messagebus:!:101:" >> /mnt/etc/group testmkd /mnt/var/run/dbus - # chown 100:101 /mnt/var/run/dbus + # set permissions with userid + echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld rllinker "dbus" "$start" "$stop" fi if [ -f /mnt/etc/init.d/resmgr ] ; then @@ -82,6 +86,12 @@ if [ "x$start_dreshal" = "xyes" ]; then strinfile "haldaemon:" /mnt/etc/passwd || \ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ >> /mnt/etc/passwd + strinfile "haldaemon:" /mnt/etc/group || \ + echo "haldaemon:!:103:" >> /mnt/etc/group + testmkd /mnt/var/run/hal + # set permissions with userid + echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld start="0"`expr $start + 1` stop="0"`expr $start - 1` rllinker "haldaemon" "$start" "$stop" diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3 index 6bf69f2c..6aa1d4b6 100644 --- a/initrd/distro-specs/suse/functions-9.3 +++ b/initrd/distro-specs/suse/functions-9.3 @@ -102,7 +102,7 @@ if [ "x$start_syslog" = "xyes" ] ; then # logging servers might be specified in $log_servers (from e.g. dhcp) echo -e "# File modified by $0 within initial ramdisk" \ > /etc/syslog-ng.conf - sed -e "s,.*dhcp/dev.*,," -e "s,.*named/dev.*,," \ + sed -e "s,.*dhcp/dev.*,,;s,.*named/dev.*,," \ /mnt/etc/syslog-ng/syslog-ng.conf >> /etc/syslog-ng.conf cp /etc/syslog-ng.conf /mnt/etc/syslog-ng/syslog-ng.conf rllinker syslog "02" "20" @@ -132,55 +132,6 @@ if [ "x$start_snmp" = "xyes" ] ; then fi } -# x11 stuff --> obsoleted by new vmware integration concept -#descsession () { -#if [ "x$desktop_session" != "x" ] ; then -# windowmanagers="$desktop_session" -# # write script for desktop-session chooser -# if [ "x$vmware" != "xno" ] ; then -# debug="" -# [ ${DEBUGLEVEL} -gt 0 ] && debug="--debug 1" -# echo -e "#!/bin/sh\n#\n# file generated by\n#\t$0:\n#\t$date\n -#OSTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$1}'\` -#SPECTYPE=\`echo \$0 | sed -e \"s,-, ,\" -e \"s,.*/,,\" | awk '{print \$2}'\`\n -#OPTS=\"-o \$OSTYPE \${SPECTYPE:+\"-s \$SPECTYPE\"}\"\n -#xterm -bg black -fg white -geometry 170x30+0-0 +sb \ -#-e \"runvmware \$OPTS $debug\"\n" > /mnt/var/X11R6/bin/desktop-session -# chmod a+x /mnt/var/X11R6/bin/desktop-session -# addpath="true"; -# fi -#else -# windowmanagers="kde,gnome,icewm,failsafe" -#fi -# check if /usr/X11R6/bin is writeable, else use /var/X11R6/bin -#if [ -w /mnt/usr/X11R6/bin/WM-Session ] ; then -# sesspath="/usr/X11R6/bin" -#else -# sesspath="/var/X11R6/bin" -# addpath="true" -#fi - -# create links to desktop-session chooser -#[ -f /mnt/usr/bin/X11/wmlist ] && wmlist=`cat /mnt/usr/bin/X11/wmlist` -#testmkd /mnt/etc/X11/sessions -#for i in `echo $windowmanagers|sed -e "s/,/ /g"` ; do -# # beware!! quickhack for VMware sessions -# strinstr "$i" "$wmlist" || \ -# test -x /mnt/usr/X11R6/bin/$i || \ -# echo -e "[Desktop Entry]\nX-SuSE-translate=true\nEncoding=UTF-8\n\ -#Type=XSession\nExec=$i\nTryExec=$sesspath/$i\n\ -#Name=$i\n" > /mnt/etc/X11/sessions/$i.desktop -# # does not work correctly (add /var/X11R6/bin to path!!) -# test -x /mnt/usr/X11R6/bin/$i || \ -# ln -fs /var/X11R6/bin/desktop-session /mnt/$sesspath/$i -#done - -# add special path /var/X11R6/bin to the PATH variable -#[ "x$addpath" != "x" ] && \ -# echo -e "# added path component by $0: $date\n\ -#PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/SuSEconfig/profile -#} - # configure X display manager (/etc/sysconfig/displaymanager) config_dm_entry () { local dm="$1" @@ -362,11 +313,15 @@ local start="05" local stop="18" if [ "x$start_dreshal" = "xyes" ]; then if [ -f /mnt/etc/init.d/dbus ] ; then - strinfile "messagebus:" /mnt/etc/passwd || \ - echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ - >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/passwd || \ + echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ + >> /mnt/etc/passwd + strinfile "messagebus:" /mnt/etc/group || \ + echo "messagebus:!:101:" >> /mnt/etc/group testmkd /mnt/var/run/dbus - chown 100:101 /mnt/var/run/dbus + # set permissions with userid + echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld rllinker "dbus" "$start" "$stop" fi if [ -f /mnt/etc/init.d/resmgr ] ; then @@ -379,8 +334,12 @@ if [ "x$start_dreshal" = "xyes" ]; then strinfile "haldaemon:" /mnt/etc/passwd || \ echo "haldaemon:x:105:103:User for haldaemon:/var/run/hal:/bin/false" \ >> /mnt/etc/passwd + strinfile "haldaemon:" /mnt/etc/group || \ + echo "haldaemon:!:103:" >> /mnt/etc/group testmkd /mnt/var/run/hal - chown 105:103 /mnt/var/run/hal + # set permissions with userid + echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ + >>/mnt/etc/${D_INITDIR}/boot.ld start="0"`expr $start + 1` stop="0"`expr $start - 1` rllinker "hal" "$start" "$stop" @@ -433,16 +392,6 @@ rllinker "portmap" "02" "20" # start vmware config_vmware () { -echo -e "#! /bin/sh\n# /etc/${D_INITDIR}/vmware-prep\n#\n\ -# file generated by $0 within initial ramdisk\n\ -. /etc/rc.status\n. /etc/sysconfig/logfile\n\ -\ncase \"\$1\" in\n start)\ -\techo -n \"Starting preparation of vmware environment \"" \ - >> /mnt/etc/${D_INITDIR}/vmware-prep -cat /etc/vmware-prep >> /mnt/etc/${D_INITDIR}/vmware-prep -echo -e "\trc_status -v\n\t;;\nesac\nrc_exit" \ - >> /mnt/etc/${D_INITDIR}/vmware-prep -chmod u+x /mnt/etc/${D_INITDIR}/vmware-prep rllinker "vmware-prep" "18" "02" rllinker "vmware" "20" "02" # if running start scripts in parallel vmware-prep is not recognized @@ -457,24 +406,24 @@ sed -e "s,TARGETS =,TARGETS = vmware-prep," \ cp /etc/.depend.start /mnt/etc/${D_INITDIR}/.depend.start } -# initialize boot.ld - skript to be executed during early system startup +# initialize runlevel skript to be executed during system startup # (before most of the normal boot init scripts) # this script should operate like a normal runlevel script -d_mkbootld () { +d_mkrlscript () { +local switch=$1 +local name=$2 +local info=$3 case "$1" in init) - echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/boot.ld written \ -from $0" >/mnt/etc/${D_INITDIR}/boot.ld - echo -e '\n. /etc/rc.status\nrc_reset\ncase "$1" in\n start)' \ - >>/mnt/etc/${D_INITDIR}/boot.ld - echo -e '\techo -n "Running post configuration required by initrd"' \ - >>/mnt/etc/${D_INITDIR}/boot.ld - chmod u+x /mnt/etc/${D_INITDIR}/boot.ld + echo -en "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name written \ +from $0\n. /etc/rc.status\n. /etc/sysconfig/logfile\nrc_reset\n\ +case \"\$1\" in\n start)\n\techo -n " >>/mnt/etc/${D_INITDIR}/$name + echo "\"$info\"" >>/mnt/etc/${D_INITDIR}/$name + chmod u+x /mnt/etc/${D_INITDIR}/$name ;; close) echo -e "\trc_status -v\n\t;;\n stop)\n\t;;\nesac\nrc_exit" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - + >>/mnt/etc/${D_INITDIR}/$name ;; esac } diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10 index 14d7e236..6567f14b 100644 --- a/initrd/distro-specs/ubuntu/functions-5.10 +++ b/initrd/distro-specs/ubuntu/functions-5.10 @@ -2,7 +2,7 @@ # linux diskless clients (executed within initial # ramdisk after genconfig) # -# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 23-03-2006 +# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006 # Nico Dietrich # Felix Endres # @@ -22,8 +22,7 @@ preinit () { } postinit () { - # A command seems to be necessary here - echo "" + : } # AUS SuSE-9.3 @@ -253,21 +252,21 @@ config_bt () { # initialize boot.ld - skript to be executed during early system startup # (before most of the normal boot init scripts) # this script should operate like a normal runlevel script (fixme!!) -d_mkbootld () { -case "$1" in +d_mkrlscript () { +local switch=$1 +local name=$2 +local info=$3 +case "$switch" in init) - echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/boot.ld written \ -from $0" >/mnt/etc/${D_INITDIR}/boot.ld - echo -e '\n\ncase "$1" in\n start)' \ - >>/mnt/etc/${D_INITDIR}/boot.ld - echo -e '\techo -n "Running post configuration required by initrd"' \ - >>/mnt/etc/${D_INITDIR}/boot.ld - chmod u+x /mnt/etc/${D_INITDIR}/boot.ld + echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name written \ +from $0" >/mnt/etc/${D_INITDIR}/$name + echo -e "\n\ncase \"\$1\" in\n start)\techo -n \"$info\"" \ + >>/mnt/etc/${D_INITDIR}/$name + chmod u+x /mnt/etc/${D_INITDIR}/$name ;; close) echo -e "\t;;\n stop)\n\t;;\nesac\nexit 0" \ - >>/mnt/etc/${D_INITDIR}/boot.ld - + >>/mnt/etc/${D_INITDIR}/$name ;; esac } @@ -279,13 +278,6 @@ config_nscd () { # start vmware config_vmware () { -echo -e "#! /bin/sh\n#\n# /etc/${D_INITDIR}/vmware-prep\n\ -# file generated by $0 within initial ramdisk\n\ -# hier fehlt noch der uebliche Ubuntu Startskript header" \ - >> /mnt/etc/${D_INITDIR}/vmware-prep -cat /etc/vmware-prep >> /mnt/etc/${D_INITDIR}/vmware-prep -echo -e "# und der Abschluss" >> /mnt/etc/${D_INITDIR}/vmware-prep -chmod u+x /mnt/etc/${D_INITDIR}/vmware-prep rllinker "vmware-prep" "18" "02" rllinker "vmware" "20" "02" } |