start with the simplest possible setup
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 8 Feb 2013 18:42:37 +0000 (19:42 +0100)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Fri, 8 Feb 2013 18:42:37 +0000 (19:42 +0100)
build.sh
prep.sh
systemd/pl_boot.service
systemd/pl_boot.target
systemd/pl_sysinit.service [deleted file]
systemd/pl_sysinit.target [deleted file]

index 8f71c11..51ba813 100755 (executable)
--- a/build.sh
+++ b/build.sh
@@ -337,7 +337,10 @@ EOF
     KERNEL_ARGS="$KERNEL_ARGS biosdevname=0"
     # making sure selinux is turned off - somehow this is needed with lxc/f14
     KERNEL_ARGS="$KERNEL_ARGS selinux=0"
-
+    # set default target for systemd
+    KERNEL_ARGS="$KERNEL_ARGS systemd.unit=pl_boot.target"
+    # output more systemd-related messages on the console
+    KERNEL_ARGS="$KERNEL_ARGS systemd.log_level=debug systemd.log_target=kmsg"
     [ -n "$KERNEL_ARGS" ] && echo "$KERNEL_ARGS" > $OVERLAY/kargs.txt
 
     # Pack overlay files into a compressed archive
diff --git a/prep.sh b/prep.sh
index 38f2a0b..0c6989a 100755 (executable)
--- a/prep.sh
+++ b/prep.sh
@@ -92,19 +92,11 @@ if [ -d $bootcd/etc/init ] ; then
     popd    
 fi
 # Install systemd files for f16 and above
-# NOTE: pl_sysinit is actually invoked in the pl_boot service file
-# ExecStartPre=/etc/init.d/pl_sysinit
-# this is auick and dirty but does the job
 if [ -d $bootcd/etc/systemd/system ] ; then
     echo "* Installing systemd files"
-    for file in pl_boot.service pl_boot.target pl_sysinit.service pl_sysinit.target; do
-       install -D -m 644 systemd/$file $bootcd/lib/systemd/system
+    for file in pl_boot.service pl_boot.target ; do
+       install -D -m 644 systemd/$file $bootcd/etc/systemd/system
     done
-    ln -sf /lib/systemd/system/pl_boot.target $bootcd/etc/systemd/system/default.target
-    mkdir -p $bootcd/lib/systemd/system/pl_boot.target.wants
-    mkdir -p $bootcd/lib/systemd/system/pl_sysinit.target.wants
-    ln -sf /lib/systemd/system/pl_boot.service $bootcd/lib/systemd/system/pl_boot.target.wants/pl_boot.service
-    ln -sf /lib/systemd/system/pl_sysinit.service $bootcd/lib/systemd/system/pl_sysinit.target.wants/pl_sysinit.service
 fi
 
 # Install fallback node configuration file
index c8a583b..793bd3d 100644 (file)
@@ -1,10 +1,8 @@
 [Unit]
 Description=pl_boot service
-After=pl_sysinit.target
 
 [Service]
-ExecStartPre=/etc/init.d/pl_sysinit
 ExecStart=/etc/init.d/pl_boot
+ExecStartPre=/etc/init.d/pl_sysinit
+Type=oneshot
 
-[Install]
-WantedBy=pl_boot.target
index 293b759..667eaf4 100644 (file)
@@ -8,11 +8,5 @@
 # See systemd.special(7) for details
 
 [Unit]
-Description=pl_boot
-#Requires=basic.target
-#Conflicts=rescue.service rescue.target
-#After=basic.target rescue.service rescue.target
-#AllowIsolate=yes
-
-#[Install]
-#Alias=default.target
+Description=pl_boot BootCD default target
+Requires=pl_boot.service
diff --git a/systemd/pl_sysinit.service b/systemd/pl_sysinit.service
deleted file mode 100644 (file)
index 36b65ac..0000000
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=pl_sysinit service
-Before=pl_boot.target
-#After=syslog.target ntpdate.service
-
-[Service]
-ExecStart=/etc/init.d/pl_sysinit
-
-[Install]
-WantedBy=pl_sysinit.target
diff --git a/systemd/pl_sysinit.target b/systemd/pl_sysinit.target
deleted file mode 100644 (file)
index 4212402..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-#  This file is part of systemd.
-#
-#  systemd is free software; you can redistribute it and/or modify it
-#  under the terms of the GNU General Public License as published by
-#  the Free Software Foundation; either version 2 of the License, or
-#  (at your option) any later version.
-
-# See systemd.special(7) for details
-
-[Unit]
-Description=PlanetLab System Initialization
-Conflicts=emergency.service emergency.target
-Wants=local-fs.target swap.target
-After=local-fs.target swap.target emergency.service emergency.target
-RefuseManualStart=yes