summaryrefslogtreecommitdiffstats
path: root/initrd/distro-specs
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-03-25 17:17:31 +0100
committerDirk von Suchodoletz2006-03-25 17:17:31 +0100
commit494d472f83758f41e6f38b9b63fc42e79c5d3635 (patch)
treef327c3626bc159e9316476abec2b53d6201a1a46 /initrd/distro-specs
parentmove vm-mount into InitRD, heavy cleanups in initial ramdisk (diff)
downloadcore-494d472f83758f41e6f38b9b63fc42e79c5d3635.tar.gz
core-494d472f83758f41e6f38b9b63fc42e79c5d3635.tar.xz
core-494d472f83758f41e6f38b9b63fc42e79c5d3635.zip
ensured "ash" compatibility, minor fixes and cleanups, ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@128 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/distro-specs')
-rw-r--r--initrd/distro-specs/suse/functions-9.328
-rw-r--r--initrd/distro-specs/ubuntu/functions-5.1056
2 files changed, 17 insertions, 67 deletions
diff --git a/initrd/distro-specs/suse/functions-9.3 b/initrd/distro-specs/suse/functions-9.3
index 6aa1d4b6..fbd74586 100644
--- a/initrd/distro-specs/suse/functions-9.3
+++ b/initrd/distro-specs/suse/functions-9.3
@@ -4,9 +4,7 @@
# functions file). This file is the main base for the
# following SuSE distributions
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 24-03-2006
-# Blabla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 25-03-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
@@ -60,9 +58,8 @@ if [ -f /mnt/etc/init.d/ntp ] ; then
fi
testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null
if [ "x$start_ntp" = "xinitial" ] ; then
- echo -e "\t# entry added by $0: $date" \
- >>/mnt/etc/${D_INITDIR}/boot.ld
- echo -e "\tntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 &" \
+ echo -e "\t# entry added by $0: $date\n\t( ntpdate -s -b $ntp_servers\
+ >${LOGFILE} 2>&1 && \\n\t which hwclock &>/dev/null && hwclock -w ) &" \
>>/mnt/etc/${D_INITDIR}/boot.ld
elif [ "x$start_ntp" = "xyes" ] ; then
rllinker "ntp" "$start" "$stop"
@@ -114,8 +111,12 @@ fi
config_sshd () {
if [ "x$start_sshd" = "xyes" ] ; then
if [ -f /mnt/etc/init.d/sshd ] ; then
- testmkd /mnt/var/lib/sshd; testmkd /mnt/var/lib/empty
+ testmkd /mnt/var/lib/sshd
+ testmkd /mnt/var/lib/empty
rllinker "sshd" "12" "10"
+ else
+ error " The sshd start script does not seem to be installed, so \
+requesting\n the start of service does not make much sense." nonfatal
fi
fi
}
@@ -410,15 +411,14 @@ sed -e "s,TARGETS =,TARGETS = vmware-prep," \
# (before most of the normal boot init scripts)
# this script should operate like a normal runlevel script
d_mkrlscript () {
-local switch=$1
-local name=$2
-local info=$3
+local switch="$1"
+local name="$2"
+local info="$3"
case "$1" in
init)
- 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
+ echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name written \
+from $0\n. /etc/rc.status\n. /etc/sysconfig/logfile\nrc_reset\ncase \
+\"\$1\" in\n start)\n\techo -n \"$info\"" >>/mnt/etc/${D_INITDIR}/$name
chmod u+x /mnt/etc/${D_INITDIR}/$name
;;
close)
diff --git a/initrd/distro-specs/ubuntu/functions-5.10 b/initrd/distro-specs/ubuntu/functions-5.10
index 6567f14b..31a20a64 100644
--- a/initrd/distro-specs/ubuntu/functions-5.10
+++ b/initrd/distro-specs/ubuntu/functions-5.10
@@ -146,56 +146,6 @@ if [ "x$start_snmp" = "xyes" ] ; then
fi
}
-# x11 stuff
-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`
-
-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/profile
-
-}
-
# configure display manager (runlevel links and kind of manager)
config_dm () {
# should be stated that entries were made (fixmee how??)
@@ -253,9 +203,9 @@ config_bt () {
# (before most of the normal boot init scripts)
# this script should operate like a normal runlevel script (fixme!!)
d_mkrlscript () {
-local switch=$1
-local name=$2
-local info=$3
+local switch="$1"
+local name="$2"
+local info="$3"
case "$switch" in
init)
echo -e "#!/bin/sh\n# skeleton of /etc/${D_INITDIR}/$name written \