summaryrefslogtreecommitdiffstats
path: root/initramfs/stage3-stuff/init
diff options
context:
space:
mode:
authorroot2010-04-13 15:49:09 +0200
committerroot2010-04-13 15:49:09 +0200
commit91c3a8df4be49fba4c7398413e15fc9868b94bd0 (patch)
tree7305f330b58eed9a0d9bd01b20ca0efbe8b4f23d /initramfs/stage3-stuff/init
parentfix pbs stuff (diff)
parentvirtualization plugin, now with calculation of mem, run-vmgrid and run-virt u... (diff)
downloadcore-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.gz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.tar.xz
core-91c3a8df4be49fba4c7398413e15fc9868b94bd0.zip
Merge branch 'master' of git@openslx.org:openslx/core
Diffstat (limited to 'initramfs/stage3-stuff/init')
-rwxr-xr-xinitramfs/stage3-stuff/init18
1 files changed, 14 insertions, 4 deletions
diff --git a/initramfs/stage3-stuff/init b/initramfs/stage3-stuff/init
index a96c66e0..40816192 100755
--- a/initramfs/stage3-stuff/init
+++ b/initramfs/stage3-stuff/init
@@ -1,6 +1,6 @@
#!/bin/ash
# Copyright (c) 2003..2006 - RZ Uni Freiburg
-# Copyright (c) 2006..2009 - OpenSLX GmbH
+# Copyright (c) 2006..2010 - OpenSLX GmbH
#
# This program is free software distributed under the GPL version 2.
# See http://openslx.org/COPYING
@@ -379,6 +379,7 @@ else
fi
runinithook '10-nw-if-config'
+
# check for multiple ethernet interfaces (we have at least the mac of PXE boot
# device in $bootmac)
# check here for the active ethernet link (skip non-ethN interfaces)
@@ -410,6 +411,7 @@ if strinstr "eth" "$nwif" ; then
done
fi
# hook to setup bridging (several virtualization tools ...)
+
runinithook '20-nw-bridge-config'
# set up loopback networking
@@ -802,6 +804,14 @@ fi
runinithook '50-have-layered-fs'
+# generate a set of default directories
+. /etc/openslx.conf
+for dir in $OPENSLX_DEFAULT_LOGDIR $OPENSLX_DEFAULT_BINDIR \
+ $OPENSLX_DEFAULT_LIBDIR $OPENSLX_DEFAULT_VIRTDIR; do
+ testmkd /mnt/$dir
+done
+chmod -R 1777 /mnt/${OPENSLX_DEFAULT_LOGDIR}
+
# script for stuff to execute during early bootup
d_mkrlscript init boot.slx "Running configuration postponed from InitRamFS"
echo "fs complete at $(sysup)" >/tmp/fscmpl
@@ -927,6 +937,7 @@ else
fi
runinithook '80-after-plugins'
+
# runtimer
[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
echo "** Plugin configuration finished at $(sysup)"
@@ -969,8 +980,6 @@ mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \
done
mount 2>/dev/null | grep -q /lib/modules && error "$init_errumnt"
-# check for inittab file (might fail for new style init -> upstart)
-test -f /mnt/etc/inittab || test -d /mnt/etc/event.d || error "$init_erritab"
# close runlevel script for stuff to execute during early bootup
d_mkrlscript close boot.slx ""
# put /tmp into stage4 mtab and add stuff to stage4 fstab
@@ -1015,4 +1024,5 @@ unset BOOT_IMAGE KCMDLINE KERNEL MODPRV NWMODULES OLDPWD UDEVD_EVENT_TIMEOUT \
runinithook '99-handing-over'
# new style of pivoting (switch_root or run-init)
-exec /sbin/switch_root -c dev/console /mnt /sbin/init || error "$init_runinit"
+exec /sbin/switch_root -c dev/console /mnt /sbin/init $DEBUG_UPSTART || \
+ error "$init_runinit"