summaryrefslogtreecommitdiffstats
path: root/initramfs/distro-specs/ubuntu/functions-default
diff options
context:
space:
mode:
authorDirk von Suchodoletz2010-03-15 15:58:29 +0100
committerDirk von Suchodoletz2010-03-15 15:58:29 +0100
commitbf1b3dbfafbbfd56e20fe51de8085f4138a5d501 (patch)
treeaf56a4a3b324bf25555e79ef0f717c515cf50f1c /initramfs/distro-specs/ubuntu/functions-default
parentConfig hash for reduced option set of gdm custom.conf see #676. (more (diff)
downloadcore-bf1b3dbfafbbfd56e20fe51de8085f4138a5d501.tar.gz
core-bf1b3dbfafbbfd56e20fe51de8085f4138a5d501.tar.xz
core-bf1b3dbfafbbfd56e20fe51de8085f4138a5d501.zip
Adding the runlevel linker again (having the upstart component for newer
Ubuntus and backward compability ...)
Diffstat (limited to 'initramfs/distro-specs/ubuntu/functions-default')
-rw-r--r--initramfs/distro-specs/ubuntu/functions-default25
1 files changed, 25 insertions, 0 deletions
diff --git a/initramfs/distro-specs/ubuntu/functions-default b/initramfs/distro-specs/ubuntu/functions-default
index ef7ece69..bfd01524 100644
--- a/initramfs/distro-specs/ubuntu/functions-default
+++ b/initramfs/distro-specs/ubuntu/functions-default
@@ -76,6 +76,31 @@ initial_boot () {
:
}
+# runlevel linker - mostly deprecated in the old form because of new upstart
+# mechanism (with backward compatibility)
+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
+else
+ error echo "Target $(pwd)../${script} does not exist. Skipping links."
+fi
+}
+
# set up localization like keytable, console
dlocale () {
# fixme -- use keytable setup script here