diff options
author | Dirk von Suchodoletz | 2007-07-01 18:14:43 +0200 |
---|---|---|
committer | Dirk von Suchodoletz | 2007-07-01 18:14:43 +0200 |
commit | 6af2fcf01d7f63eb14349f0931e8363863e18018 (patch) | |
tree | 2ae379dca1c0904ca9c610f4431f5ea0aceb359e /initramfs | |
parent | Cleanups and simplifications ... (diff) | |
download | core-6af2fcf01d7f63eb14349f0931e8363863e18018.tar.gz core-6af2fcf01d7f63eb14349f0931e8363863e18018.tar.xz core-6af2fcf01d7f63eb14349f0931e8363863e18018.zip |
Cleanup and beautification of runlevel linker stuff for SuSE distros ...
git-svn-id: http://svn.openslx.org/svn/openslx/trunk@1202 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.0 | 2 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.1 | 4 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-10.2 | 30 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-9.3 | 20 | ||||
-rw-r--r-- | initramfs/distro-specs/suse/functions-default | 60 |
5 files changed, 60 insertions, 56 deletions
diff --git a/initramfs/distro-specs/suse/functions-10.0 b/initramfs/distro-specs/suse/functions-10.0 index 577465e4..69d61887 100644 --- a/initramfs/distro-specs/suse/functions-10.0 +++ b/initramfs/distro-specs/suse/functions-10.0 @@ -15,7 +15,7 @@ # prepare virtual machine environment (vmware, vmplayer) config_vmware () { -rllinker "vmware" "20" "02" +rllinker "vmware" 20 2 # during vmware sessions linux should not handle usb events/devices testmkd /mnt/var/X11R6/bin echo '#!/bin/sh'> /mnt/var/X11R6/bin/vm-udev diff --git a/initramfs/distro-specs/suse/functions-10.1 b/initramfs/distro-specs/suse/functions-10.1 index 6de0412c..7b32871e 100644 --- a/initramfs/distro-specs/suse/functions-10.1 +++ b/initramfs/distro-specs/suse/functions-10.1 @@ -20,7 +20,7 @@ if [ "x$start_afs" = "xyes" ] ; then if [ -f /mnt/etc/init.d/openafs-client ] ; then test -d /mnt/afs || error "${df_errafsd}" testmkd /mnt/var/cache/openafs - rllinker "openafs-client" "15" "06" + rllinker "openafs-client" 15 6 # echo -e "# /etc/sysconfig/afs-client - file generated by \ #$0:\n#\t$date\n" >/etc/sysconfig/afs-client.new; # sed -e "s,THIS_CELL_SERVER.*,THIS_CELL_SERVER=\"$cell_serv\"," \ @@ -38,7 +38,7 @@ fi # prepare virtual machine environment (vmware, vmplayer) config_vmware () { -rllinker "vmware" "20" "02" +rllinker "vmware" 20 2 # during vmware sessions linux should not handle usb events/devices # vmplayer and recent versions of vmware do not need this hack if [ ! -x /mnt/usr/bin/vmplayer ] ; then diff --git a/initramfs/distro-specs/suse/functions-10.2 b/initramfs/distro-specs/suse/functions-10.2 index 1935cf6d..9c5e8273 100644 --- a/initramfs/distro-specs/suse/functions-10.2 +++ b/initramfs/distro-specs/suse/functions-10.2 @@ -32,8 +32,8 @@ config_kdm_template # devices when loggin on) config_dreshal () { if [ "x$start_dreshal" = "xyes" ]; then - local start="05" - local stop="18" + local start=5 + local stop=18 if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then strinfile "messagebus:" /mnt/etc/passwd || \ echo "messagebus:x:100:101:User for D-BUS:/var/run/dbus:/bin/false" \ @@ -44,19 +44,19 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - rllinker "dbus" "$start" "$stop" + rllinker "dbus" $start $stop fi if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then testmkd /mnt/var/run/resmgr/classes - start="0"$(expr $start + 1) - stop="0"$(expr $start - 1) - rllinker "resmgr" "$start" "$stop" + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "resmgr" $start $stop fi if [ -f /mnt/etc/${D_INITDIR}/policykitd ] ; then testmkd /mnt/var/run/polkit - start="0"$(expr $start + 1) - stop="0"$(expr $start - 1) - rllinker "policykitd" "$start" "$stop" + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "policykitd" $start $stop fi if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then strinfile "haldaemon:" /mnt/etc/passwd || \ @@ -68,9 +68,9 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - start="0"$(expr $start + 1) - stop="0"$(expr $start - 1) - rllinker "haldaemon" "$start" "$stop" + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "haldaemon" $start $stop fi fi } @@ -88,13 +88,13 @@ echo -e "\t# stuff needed for nfsv4\n\tmount -t rpc_pipefs rpc_pipefs \ >>/mnt/etc/${D_INITDIR}/boot.slx # portmap is required for any NFS config_portmap - rllinker "idmapd" "14" "08" - rllinker "gssd" "15" "07" + rllinker "idmapd" 14 8 + rllinker "gssd" 15 7 fi } # prepare virtual machine environment (vmware, vmplayer) config_vmware () { -rllinker "vmware" "20" "02" +rllinker "vmware" 20 2 # during vmware sessions linux should not handle usb events/devices # vmplayer and recent versions of vmware do not need this hack if [ ! -x /mnt/usr/bin/vmplayer ] ; then diff --git a/initramfs/distro-specs/suse/functions-9.3 b/initramfs/distro-specs/suse/functions-9.3 index 89e13033..210fc4da 100644 --- a/initramfs/distro-specs/suse/functions-9.3 +++ b/initramfs/distro-specs/suse/functions-9.3 @@ -15,15 +15,15 @@ # acpi and powersave config_acpi () { -rllinker powersaved "10" "12" +rllinker powersaved 10 12 } # configure dbus (inter application communication for kde and gnome), hal # (hardware abstraction layer - used e.g. by powersaved) and resmgr # (resource manager - the user gets permissions to devices when loggin on) config_dreshal () { -local start="05" -local stop="18" +local start=5 +local stop=18 if [ "x$start_dreshal" = "xyes" ]; then if [ -e /mnt/etc/${D_INITDIR}/dbus ] ; then strinfile "messagebus:" /mnt/etc/passwd || \ @@ -35,13 +35,13 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - rllinker "dbus" "$start" "$stop" + rllinker "dbus" $start $stop fi if [ -e /mnt/etc/${D_INITDIR}/resmgr ] ; then testmkd /mnt/var/run/resmgr/classes - start="0"`expr $start + 1` - stop="0"`expr $start - 1` - rllinker "resmgr" "$start" "$stop" + start=$(($start + 1)) + stop=$(($start - 1)) + rllinker "resmgr" $start $stop fi if [ -e /mnt/etc/${D_INITDIR}/hal ] ; then strinfile "haldaemon:" /mnt/etc/passwd || \ @@ -53,9 +53,9 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - start="0"`expr $start + 1` - stop="0"`expr $start - 1` - rllinker "hal" "$start" "$stop" + start=$(($start + 1)) + stop=$(($start - 1)) + rllinker "hal" $start $stop fi fi } diff --git a/initramfs/distro-specs/suse/functions-default b/initramfs/distro-specs/suse/functions-default index 894d5a8a..8c616589 100644 --- a/initramfs/distro-specs/suse/functions-default +++ b/initramfs/distro-specs/suse/functions-default @@ -63,8 +63,12 @@ echo "$host_name" > /mnt/etc/HOSTNAME # linking runlevel scripts rllinker () { local script="$1" -local start="$2" -local stop="$3" +if [ $2 -lt 10 ] ; then + local start="0$2"; else local start="$2" +fi +if [ $3 -lt 10 ] ; then + local stop="0$3"; else local stop="$3" +fi # empty runlevel links - decision on running certain services is # passed via configuration for i in rc3.d/K$stop$script rc5.d/K$stop$script \ @@ -85,21 +89,21 @@ if [ -e /mnt/etc/${D_INITDIR}/ntp ] ; then fi testmkd /mnt/var/lib/ntp/var/run/ntp &>/dev/null if [ "x$start_ntp" = "xyes" ] ; then - rllinker "ntp" "07" "14" + rllinker "ntp" 7 14 fi fi } # function for atd config_atd () { if [ "x$start_atd" = "xyes" ]; then - rllinker "atd" "14" "04" + rllinker "atd" 14 4 fi } # function for configuration of cron services config_cron () { if [ "x$start_cron" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/cron ] ; then - rllinker "cron" "18" "02" + rllinker "cron" 18 2 testmkd /mnt/var/spool/cron/lastrun testmkd /mnt/var/spool/cron/tabs echo -e "# /etc/crontab - file generated by $0:\n\ @@ -120,7 +124,7 @@ if [ "x$start_syslog" != "xno" ] ; then -i /mnt/etc/sysconfig/syslog # logoutput depending on $start_syslog definitions sysngwriter /mnt/etc/syslog-ng/syslog-ng.conf - rllinker syslog "02" "20" + rllinker syslog 2 20 else error "$df_errsysl" nonfatal fi @@ -132,7 +136,7 @@ if [ "x$start_sshd" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then testmkd /mnt/var/lib/sshd testmkd /mnt/var/lib/empty - rllinker "sshd" "12" "10" + rllinker "sshd" 12 10 else error "$df_errsshd" nonfatal fi @@ -142,7 +146,7 @@ fi config_snmp () { if [ "x$start_snmp" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/snmpd ] ; then - rllinker "snmpd" "24" "02" + rllinker "snmpd" 24 2 testmkd /mnt/var/lib/net-snmp >/dev/null 2>&1 fi # fixme!! @@ -155,12 +159,12 @@ if [ "x${start_printdaemon}" != "x" ] && \ [ "x${start_printdaemon}" != "xno" ]; then case ${start_printdaemon} in yes|cups*|CUPS*) - rllinker "cups" "25" "01" + rllinker "cups" 25 1 testmkd /mnt/var/spool/cups/tmp chown -R lp:lp /var/spool/cups ;; lp*|LP*|PLP*) - rllinker "lpd" "25" "01" + rllinker "lpd" 25 1 testmkd /mnt/var/spool/lpd chown -R lp:lp /var/spool/lpd ;; @@ -182,8 +186,8 @@ config_samba () { if [ "$start_samba" != "no" ]; then testmkd /mnt/var/run/samba if [ "$start_samba" = "yes" ] && [ -f /mnt/etc/init.d/smb ] ; then - rllinker "smb" "27" "02" - rllinker "nmb" "28" "02" + rllinker "smb" 27 2 + rllinker "nmb" 28 2 fi # set up samba configuration with NetBIOS name servers etc. if [ "x$netbios_name_servers" != "x" ]; then @@ -403,8 +407,8 @@ sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ # acpi and powersave daemons, required e.g. to shutdown the machine via # power button, no need for early start config_acpi () { -rllinker acpid "22" "12" -rllinker powersaved "23" "11" +rllinker acpid 22 12 +rllinker powersaved 23 11 # dbus is required to run acpid and powersaved start_dreshal="yes" } @@ -413,8 +417,8 @@ start_dreshal="yes" # (resource manager - the user gets permissions to devices when loggin on) # runlevel script for haldaemon is now haldaemon instead of hal config_dreshal () { -local start="05" -local stop="18" +local start=5 +local stop=18 if [ "x$start_dreshal" = "xyes" ]; then if [ -f /mnt/etc/${D_INITDIR}/dbus ] ; then strinfile "messagebus:" /mnt/etc/passwd || \ @@ -426,13 +430,13 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown messagebus:messagebus /var/run/dbus 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - rllinker "dbus" "$start" "$stop" + rllinker "dbus" $start $stop fi if [ -f /mnt/etc/${D_INITDIR}/resmgr ] ; then testmkd /mnt/var/run/resmgr/classes - start="0"$(expr $start + 1) - stop="0"$(expr $start - 1) - rllinker "resmgr" "$start" "$stop" + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "resmgr" $start $stop fi if [ -f /mnt/etc/${D_INITDIR}/haldaemon ] ; then strinfile "haldaemon:" /mnt/etc/passwd || \ @@ -444,9 +448,9 @@ if [ "x$start_dreshal" = "xyes" ]; then # set permissions with userid echo -e "\tchown haldaemon:haldaemon /var/run/hal 2>/dev/null" \ >>/mnt/etc/${D_INITDIR}/boot.slx - start="0"$(expr $start + 1) - stop="0"$(expr $start - 1) - rllinker "haldaemon" "$start" "$stop" + start=$(($start + 1)) + stop=$(($stop - 1)) + rllinker "haldaemon" $start $stop fi fi } @@ -457,7 +461,7 @@ if [ -e /mnt/etc/${D_SYSCONFDIR}/autofs ] ; then sed -e "1i# /etc/${D_SYSCONFDIR}/autofs - file modified by\n#\t$0:\n#" \ -e "s,AUTOFS_OPTIONS.*,AUTOFS_OPTIONS=\"--timeout 3\"," \ -i /mnt/etc/${D_SYSCONFDIR}/autofs - rllinker "autofs" "18" "04" + rllinker "autofs" 18 4 else error "$df_erramt" nonfatal fi @@ -466,19 +470,19 @@ fi config_nscd () { if [ -e /mnt/etc/${D_INITDIR}/nscd ] ; then testmkd /mnt/var/run/nscd - rllinker "nscd" "16" "16" + rllinker "nscd" 16 16 else error "$df_errnsc" nonfatal fi } # start portmapper (needed at least for nfs and nis services) config_portmap () { -rllinker "portmap" "02" "20" +rllinker "portmap" 2 20 } # start NIS config_nis () { if [ -f /mnt/etc/${D_INITDIR}/ypbind ] ; then - rllinker "ypbind" "06" "16" + rllinker "ypbind" 6 16 config_portmap testmkd /mnt/var/yp/nicknames else @@ -488,7 +492,7 @@ fi # start vmware config_vmware () { if [ -f /mnt/etc/${D_SYSCONFDIR}/vmware ] ; then - rllinker "vmware" "20" "02" + rllinker "vmware" 20 2 else error "df_errvmw" nonfatal fi |