summaryrefslogtreecommitdiffstats
path: root/src/initramfs/distro-specs/ubuntu
diff options
context:
space:
mode:
Diffstat (limited to 'src/initramfs/distro-specs/ubuntu')
-rw-r--r--src/initramfs/distro-specs/ubuntu/functions-default23
1 files changed, 21 insertions, 2 deletions
diff --git a/src/initramfs/distro-specs/ubuntu/functions-default b/src/initramfs/distro-specs/ubuntu/functions-default
index 51027c90..316f8c5c 100644
--- a/src/initramfs/distro-specs/ubuntu/functions-default
+++ b/src/initramfs/distro-specs/ubuntu/functions-default
@@ -36,6 +36,20 @@ postinit () {
fi
}
+config_netconsole () {
+ local MY_IP=$1
+ local MY_OLDDEV=$2
+ local MY_DEV=$3
+ local T_IP=$4
+ local T_MAC=$(arp -n |grep $T_IP| awk '{print $5}')
+ # FIXME: we need to set a valid ip for ethx if we use the bridge config
+ # from the virtualization plugins
+ [ "$MY_OLDDEV" = "$MY_DEV" ] || ip a a $MY_IP dev $MY_OLDDEV
+ modprobe netconsole netconsole=4444@$MY_IP/$MY_OLDDEV,514@$T_IP/$T_MAC
+ dmesg -n 8
+}
+
+
# distro specific function called from servconfig script
config_distro () {
# runlevel system changed significantly compared to pre 9.10 sys-v-init
@@ -76,8 +90,13 @@ export PATH=\"\$PATH:/var/opt/openslx/bin\"" >>/mnt/etc/profile
}
# initial boot looks different since ubuntu upstart
+# (executed after plugin config in stage3)
initial_boot () {
- :
+ # fix depenencies of upstart files (remove network stuff)
+ upstart_set_starton rc-sysinit filesystem
+ upstart_set_starton autofs filesystem
+ upstart_set_starton portmap filesystem
+
}
upstart_set_starton () {
@@ -101,7 +120,7 @@ upstart_set_starton () {
sed -e 's/start on.*$/start on ##starton##/' \
-i $script_path
# replace placeholder with our new value
- sed -e "s,##starton##,$starton,"
+ sed -e "s,##starton##,$starton," \
-i $script_path
else
error "Script: ${script} does not exist. Skipping modification.." nonfatal}