]> git.proxmox.com Git - pve-installer.git/commitdiff
Revert "drop unused policy-disable-rc.d"
authorStoiko Ivanov <s.ivanov@proxmox.com>
Wed, 19 Feb 2020 10:54:09 +0000 (11:54 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 19 Feb 2020 15:53:46 +0000 (16:53 +0100)
This reverts commit 8ee12a1c34f9b5980cb382aa2bb01855349a10a5.

`policy-rc.d` invocation is still used by deb-systemd-invoke (1p), despite
it's by now unfitting name.

The policy-rc.d script the installer placed into the chroot prevents the
starting of services by (debianized) maintainer-scripts [0].
This should reduce installation time on one hand, and on the other hand does
mask errors in maintainer-scripts, which error out if no systemd is running
(e.g. inside the chroot)

Noticed the problem, when testing an unrelated patch and running into
an aborted installtion, due to a, already fixed, glitch (missing '||true')
in pve-lxc's postinst script.

[0] https://people.debian.org/~hmh/invokerc.d-policyrc.d-specification.txt
   (did not find anything more current, contradicting the information there)

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
Makefile
policy-disable-rc.d [new file with mode: 0755]
proxinstall

index e232f7f544fc56366e47e0bd04b16fe29fcc9de0..d7056490f241c9f15566783271d938082bd30c52 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -9,6 +9,7 @@ DEBS = ${PVE_DEB} ${PMG_DEB} ${PBS_DEB}
 INSTALLER_SOURCES=             \
        unconfigured.sh         \
        fake-start-stop-daemon  \
+       policy-disable-rc.d     \
        interfaces              \
        pmg-banner.png          \
        pve-banner.png          \
@@ -40,6 +41,7 @@ install: ${INSTALLER_SOURCES} ${HTML_COMMON_SOURCES} ${HTML_SOURCES}
        make -C html-common install
        install -D -m 644 interfaces ${DESTDIR}/etc/network/interfaces
        install -D -m 755 fake-start-stop-daemon ${DESTDIR}/var/lib/pve-installer/fake-start-stop-daemon
+       install -D -m 755 policy-disable-rc.d ${DESTDIR}/var/lib/pve-installer/policy-disable-rc.d
        install -D -m 644 country.dat ${DESTDIR}/var/lib/pve-installer/country.dat
        install -D -m 755 unconfigured.sh ${DESTDIR}/sbin/unconfigured.sh
        install -D -m 755 proxinstall ${DESTDIR}/usr/bin/proxinstall
diff --git a/policy-disable-rc.d b/policy-disable-rc.d
new file mode 100755 (executable)
index 0000000..273e4c6
--- /dev/null
@@ -0,0 +1,7 @@
+#!/bin/sh
+
+# see /usr/share/doc/sysv-rc/README.policy-rc.d.gz
+
+# disable service activation
+
+exit 101
\ No newline at end of file
index c9d17f1a48ada548a03e40ae222bb474c6102422..bad877f5afd434ed4982292307349f23b7461afb 100755 (executable)
@@ -1601,6 +1601,7 @@ sub extract_data {
            }
        }
 
+
        $fstab .= "$swapfile none swap sw 0 0\n" if $swapfile;
 
        $fstab .= "proc /proc proc defaults 0 0\n";
@@ -1608,7 +1609,11 @@ sub extract_data {
        write_config($fstab, "$targetdir/etc/fstab");
        write_config("", "$targetdir/etc/mtab");
 
-       syscmd("cp ${proxmox_libdir}/fake-start-stop-daemon $targetdir/sbin/") == 0 ||
+       syscmd("cp ${proxmox_libdir}/policy-disable-rc.d " .
+               "$targetdir/usr/sbin/policy-rc.d") == 0 ||
+               die "unable to copy policy-rc.d\n";
+       syscmd("cp ${proxmox_libdir}/fake-start-stop-daemon " .
+               "$targetdir/sbin/") == 0 ||
                die "unable to copy start-stop-daemon\n";
 
        diversion_add($targetdir, "/sbin/start-stop-daemon", "/sbin/fake-start-stop-daemon");