From 4107c190ec055aba6184a659c612212d86ee08b8 Mon Sep 17 00:00:00 2001 From: Thierry Parmentelat Date: Fri, 8 Feb 2013 19:42:37 +0100 Subject: [PATCH] start with the simplest possible setup --- build.sh | 5 ++++- prep.sh | 12 ++---------- systemd/pl_boot.service | 6 ++---- systemd/pl_boot.target | 10 ++-------- systemd/pl_sysinit.service | 10 ---------- systemd/pl_sysinit.target | 15 --------------- 6 files changed, 10 insertions(+), 48 deletions(-) delete mode 100644 systemd/pl_sysinit.service delete mode 100644 systemd/pl_sysinit.target diff --git a/build.sh b/build.sh index 8f71c11..51ba813 100755 --- 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 --- 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 diff --git a/systemd/pl_boot.service b/systemd/pl_boot.service index c8a583b..793bd3d 100644 --- a/systemd/pl_boot.service +++ b/systemd/pl_boot.service @@ -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 diff --git a/systemd/pl_boot.target b/systemd/pl_boot.target index 293b759..667eaf4 100644 --- a/systemd/pl_boot.target +++ b/systemd/pl_boot.target @@ -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 index 36b65ac..0000000 --- a/systemd/pl_sysinit.service +++ /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 index 4212402..0000000 --- a/systemd/pl_sysinit.target +++ /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 -- 2.43.0