summaryrefslogtreecommitdiffstats
path: root/initrd/distro-specs/debian
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-04-30 15:57:36 +0200
committerDirk von Suchodoletz2006-04-30 15:57:36 +0200
commitda3771dc4695682492644e6c636fb8d68851fbfd (patch)
tree3f6b39cb8f60c514d7ff2cc97cb5523599ebdbfe /initrd/distro-specs/debian
parentWork on debian, especially udev. Some documentation too. (diff)
downloadcore-da3771dc4695682492644e6c636fb8d68851fbfd.tar.gz
core-da3771dc4695682492644e6c636fb8d68851fbfd.tar.xz
core-da3771dc4695682492644e6c636fb8d68851fbfd.zip
additions, fixups to/of several function files ...
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@205 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initrd/distro-specs/debian')
-rw-r--r--initrd/distro-specs/debian/functions-3.185
1 files changed, 56 insertions, 29 deletions
diff --git a/initrd/distro-specs/debian/functions-3.1 b/initrd/distro-specs/debian/functions-3.1
index 2a78ab6b..92e495d6 100644
--- a/initrd/distro-specs/debian/functions-3.1
+++ b/initrd/distro-specs/debian/functions-3.1
@@ -2,20 +2,18 @@
# linux diskless clients (executed within initial
# ramdisk after genconfig)
#
-# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 31-03-2006
-# Blabla
-# Blub
+# Author(s): Dirk von Suchodoletz <dirk@goe.net>, 30-04-2006
+# Felix Endres, 30-04-2006
#
# Copyright: (c) 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.1c
+# Version: 0.2.1d
# distro specific stuff to initialize
preinit () {
echo "Creating dhcp user"
- echo "dhcp:x:101:">>/etc/group
+ echo "dhcp:x:101:" >>/etc/group
echo "dhcp:x:101:101::/nonexistent:/bin/false" >>/etc/passwd
-
}
postinit () {
@@ -63,6 +61,7 @@ local start="$2"
local stop="$3"
# empty runlevel links - decision on running certain services is
# passed via configuration
+# fixme!! "stop" seems not to be used in Debian!?
for i in rc2.d/K$stop$script rc3.d/K$stop$script \
rc2.d/S$start$script rc3.d/S$start$script ; do
if ! [ -f /mnt/etc/init.d/$script ]; then
@@ -83,11 +82,9 @@ local info=$3
}
# group of functions for the normal runlevels - first parameter is start
-# second stop
+# second stop (fixme: is "stop" needed in Debian??)
# function for ntp configuration
config_ntp () {
-local start=$1
-local stop=$2
if [ -f /mnt/etc/init.d/ntp ] ; then
echo -e "ntp:x:74:65534:NTP daemon:/var/lib/ntp:/bin/false" \
>>/mnt/etc/passwd
@@ -98,7 +95,7 @@ if [ -f /mnt/etc/init.d/ntp ] ; then
echo "ntpdate -s -b $ntp_servers >${LOGFILE} 2>&1 &" \
>>/mnt/etc/${D_INITDIR}/boot.ld
else
- rllinker "ntp" "$start" "$stop"
+ rllinker "ntp" "20" "02"
fi
fi
}
@@ -106,7 +103,11 @@ fi
# function for atd
config_atd () {
if [ "x$start_atd" = "xyes" ]; then
- rllinker "atd" "$1" "$2"
+ # fixme!! needed? Fix permissions
+ #testmkd /mnt/var/spool/cron/atjobs
+ #testmkd /mnt/var/spool/cron/atspool
+ #chown /mnt/var/spool/cron/atjobs /mnt/var/spool/cron/atspool
+ rllinker "atd" "89" "01"
fi
}
@@ -114,10 +115,8 @@ fi
config_cron () {
if [ "x$start_cron" = "xyes" ] ; then
if [ -f /mnt/etc/init.d/cron ] ; then
- rllinker "cron" "18" "02"
- # fixme! check for proper pathes
- testmkd /mnt/var/spool/cron/lastrun
- testmkd /mnt/var/spool/cron/tabs
+ rllinker "cron" "89" "01"
+ testmkd /mnt/var/spool/cron/crontabs
echo -e "# /etc/crontab - file generated by $0:\n\
#\t$date\nSHELL=/bin/sh\nPATH=/usr/bin:/usr/sbin:/sbin:/bin:/usr/lib/news/bin\
\nMAILTO=\n-*/15 * * * *\troot\ttest -x /usr/lib/cron/run-crons && \
@@ -131,7 +130,7 @@ fi
# syslog service
config_syslog () {
if [ "x$start_syslog" = "xyes" ] ; then
- echo >/dev/null
+ :
fi
}
@@ -139,7 +138,7 @@ fi
config_sshd () {
if [ "x$start_sshd" = "xyes" ] ; then
if [ -f /mnt/etc/init.d/ssh ] ; then
- rllinker "sshd" "$1" "$2"
+ rllinker "sshd" "20" "02"
fi
fi
}
@@ -148,7 +147,7 @@ fi
config_snmp () {
if [ "x$start_snmp" = "xyes" ] ; then
if [ -f /mnt/etc/init.d/snmpd ] ; then
- rllinker "snmpd" "$1" "$2"
+ rllinker "snmpd" "30" "03"
testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1
fi
# fixme!!
@@ -200,17 +199,21 @@ Name=$i\n" > /mnt/etc/X11/sessions/$i.desktop
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
-
+# fixme!! add path directly to /etc/profile!?
+#[ "x$addpath" != "x" ] && \
+# echo -e "# added path component by $0: $date\n\
+#PATH=\"\$PATH:/var/X11R6/bin\"" >>/mnt/etc/profile
}
-# consolefont
+# consolefont and language
consolefont () {
echo -e "setfont ${CONSOLE_FONT} >${LOGFILE} 2>&1" \
>>/mnt/etc/${D_INITDIR}/boot.ld
+# fixme!! check for proper operation
+sed -e "s,LANGUAGE=.*,LANGUAGE=\"${LANG}\" # set within initramfs," \
+ -e "s,LANG=.*,LANG=\"${LANG}\" # set within initramfs," \
+ -i /mnt/etc/environment
}
# acpi and powersave
@@ -229,9 +232,11 @@ config_gdm () {
echo -e "\t/etc/${D_INITDIR}/gdm start >${LOGFILE} 2>&1\n\
\t( sleep 120; ln -sf /etc/${D_INITDIR}/gdm /etc/rc3.d/S01gdm \
>${LOGFILE} 2>&1) &\n" >>/mnt/etc/${D_INITDIR}/boot.ld
- # append gdm user
- echo "gdm:x:113:">>/etc/group
- echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" >>/etc/passwd
+ # check for gdm user in passwd and group files
+ # fixme!!
+ echo "gdm:x:113:">>/mnt/etc/group
+ echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \
+ >>/mnt/etc/passwd
}
# configure kdm as display manager
@@ -245,12 +250,34 @@ config_kdm () {
# configure hal, dbus, resmgr and services like that
config_dreshal () {
if [ "x$start_dreshal" = "xyes" ]; then
- echo >/dev/null
+ :
fi
}
# start name service caching daemon
config_nscd () {
-:
+ :
+}
+# fixme!! taken from SuSE10.0 untested here ...
+# prepare virtual machine environment (vmware, vmplayer)
+config_vmware () {
+rllinker "vmware-prep" "22" "02"
+rllinker "vmware" "24" "02"
+# during vmware sessions linux should not handle usb events/devices
+testmkd /mnt/var/X11R6/bin
+echo '#!/bin/sh'>> /mnt/etc/udev/rules.d/01-udev-vm.rules
+echo -e "# Script for blocking linux from handling usb \
+devices\n# during vmware sessions. If you like to remove certain modules \
+add them\n# to the list below - Dirk von Suchodoletz, <dirk@goe.net>\n\
+STATE=1\nps aux|grep -i vmware|grep -v \"grep\" &>/dev/null && { STATE=0; \
+/sbin/rmmod usb-storage &>/tmp/null; }\n\
+[ x$ACTION = xremove ] && { [ $STATE = 0 ] && /sbin/rmmod usb-storage \
+&>/dev/null; }\nexit \$STATE" > /mnt/var/X11R6/bin/vm-udev
+chmod u+x /mnt/var/X11R6/bin/vm-udev
+echo -e "# special entry to block linux from reacting to usb events during \
+running\n# vmware sessions, generated by $0 during initramfs\n# Dirk von \
+Suchodoletz, <dirk@goe.net>\nSUBSYSTEM==\"usb\", ACTION==\"add\", \
+PROGRAM=\"/var/X11R6/bin/vm-udev\", OPTIONS=\"ignore_device\"\n\
+SUBSYSTEM==\"usb\", ACTION==\"remove\", PROGRAM=\"/var/X11R6/bin/vm-udev\"" \
+ >> /mnt/etc/udev/rules.d/01-udev-vm.rules
}
-