diff options
author | Sebastian | 2010-04-29 16:24:07 +0200 |
---|---|---|
committer | Sebastian | 2010-04-29 16:24:07 +0200 |
commit | 6556aa6df7a0c26685a2e65732ac291d97a9ad92 (patch) | |
tree | 0d58971358b862cbf7572cb470b26f2bcb2a2351 /initramfs/distro-specs/ubuntu/functions-default | |
parent | Merge branch 'master' of git@openslx.org:openslx/core (diff) | |
download | core-6556aa6df7a0c26685a2e65732ac291d97a9ad92.tar.gz core-6556aa6df7a0c26685a2e65732ac291d97a9ad92.tar.xz core-6556aa6df7a0c26685a2e65732ac291d97a9ad92.zip |
fix rllinker script for ubuntu 10.04
Diffstat (limited to 'initramfs/distro-specs/ubuntu/functions-default')
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-default | 38 |
1 files changed, 23 insertions, 15 deletions
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default index 41af807e..475290bb 100644 --- a/initramfs/distro-specs/ubuntu/functions-default +++ b/initramfs/distro-specs/ubuntu/functions-default @@ -82,23 +82,31 @@ rllinker () { local script="$1" # activating the new way, check if a appropriate script is available, else # try the traditional approach -if [ -e /mnt/etc/init.inactive/${script}.conf ] ; then - mv /mnt/etc/init.inactive/${script}.conf /mnt/etc/init -elif [ -e /mnt/etc/init.d/${script} -a -n "$1" -a -n "$2" ] ; then - 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 - for i in rc2.d/K$stop$script rc3.d/K$stop$script \ - rc2.d/S$start$script rc3.d/S$start$script ; do - ln -sf ../init.d/$script /mnt/etc/$i - [ "$DEBUGLEVEL" == 5 ] && echo "Linked $script" - done + +if [ -e /mnt/etc/init.inactive/${script}.conf -o -e /mnt/etc/init/${script}.conf ]; then + # we have upstart scripts + if [ -e /mnt/etc/init.inactive/${script}.conf ] ; then + mv /mnt/etc/init.inactive/${script}.conf /mnt/etc/init + fi +elif [ -e /mnt/etc/init.d/${script} ]; then + # we old rc scripts + if [ -e /mnt/etc/init.d/${script} -a -n "$1" -a -n "$2" ] ; then + 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 + for i in rc2.d/K$stop$script rc3.d/K$stop$script \ + rc2.d/S$start$script rc3.d/S$start$script ; do + ln -sf ../init.d/$script /mnt/etc/$i + [ "$DEBUGLEVEL" == 5 ] && echo "Linked $script" + done + fi else - error "Target $(pwd)../${script} does not exist. Skipping links." nonfatal + error "Script: ${script} does not exist. Skipping setup of startscipts/events.." nonfatal fi + } # set up localization like keytable, console |