Merge branch 'master' into lxc
authorThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 4 Apr 2012 19:25:40 +0000 (21:25 +0200)
committerThierry Parmentelat <thierry.parmentelat@sophia.inria.fr>
Wed, 4 Apr 2012 19:25:40 +0000 (21:25 +0200)
in bootcd.spec, reinstate the test on the fedora distrib (for
requiring perl-syslinux) in a f16-compatible way

bootcd.spec
systemd/pl_boot.service [new file with mode: 0644]
systemd/pl_boot.target [new file with mode: 0644]
systemd/pl_sysinit.service [new file with mode: 0644]
systemd/pl_sysinit.target [new file with mode: 0644]

index af1b8bc..e5298ba 100644 (file)
@@ -100,6 +100,16 @@ tar cpf - \
 for script in bootcd bootcd-kernel; do 
     install -D -m 755 plc.d/$script $RPM_BUILD_ROOT/etc/plc.d/$script
 done
+
+#systemd files
+mkdir -p $RPM_BUILD_ROOT/lib/systemd/system
+mkdir -p $RPM_BUILD_ROOT/etc/systemd/system
+cp -pr systemd/* $RPM_BUILD_ROOT/lib/systemd/system
+ln -sf /lib/systemd/system/pl_boot.target $RPM_BUILD_ROOT/etc/systemd/system/default.target
+mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/pl_boot.target.wants
+mkdir -p $RPM_BUILD_ROOT/lib/systemd/system/pl_sysinit.target.wants
+ln -sf /lib/systemd/system/pl_boot.service $RPM_BUILD_ROOT/lib/systemd/system/pl_boot.target.wants/pl_boot.service
+ln -sf /lib/systemd/system/pl_sysinit.service $RPM_BUILD_ROOT/lib/systemd/system/pl_sysinit.target.wants/pl_sysinit.service
 popd
     
 %clean
@@ -112,6 +122,8 @@ rm -rf $RPM_BUILD_ROOT
 %files -n bootcd-initscripts
 %defattr(-,root,root,-)
 /etc/plc.d
+/lib/systemd/system
+/etc/systemd/system
 
 %changelog
 * Mon Nov 07 2011 Thierry Parmentelat <thierry.parmentelat@sophia.inria.fr> - bootcd-5.0-11
diff --git a/systemd/pl_boot.service b/systemd/pl_boot.service
new file mode 100644 (file)
index 0000000..4010cfd
--- /dev/null
@@ -0,0 +1,9 @@
+[Unit]
+Description=pl_boot service
+After=pl_sysinit.target
+
+[Service]
+ExecStart=/etc/init.d/pl_boot
+
+[Install]
+WantedBy=pl_boot.target
diff --git a/systemd/pl_boot.target b/systemd/pl_boot.target
new file mode 100644 (file)
index 0000000..293b759
--- /dev/null
@@ -0,0 +1,18 @@
+#  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=pl_boot
+#Requires=basic.target
+#Conflicts=rescue.service rescue.target
+#After=basic.target rescue.service rescue.target
+#AllowIsolate=yes
+
+#[Install]
+#Alias=default.target
diff --git a/systemd/pl_sysinit.service b/systemd/pl_sysinit.service
new file mode 100644 (file)
index 0000000..36b65ac
--- /dev/null
@@ -0,0 +1,10 @@
+[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
new file mode 100644 (file)
index 0000000..4212402
--- /dev/null
@@ -0,0 +1,15 @@
+#  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