From: Stoiko Ivanov Date: Wed, 19 Feb 2020 10:54:09 +0000 (+0100) Subject: Revert "drop unused policy-disable-rc.d" X-Git-Url: https://git.proxmox.com/?p=pve-installer.git;a=commitdiff_plain;h=c1cfbb1c8984aa5964719010d35d17afba74bfcb Revert "drop unused policy-disable-rc.d" 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 --- diff --git a/Makefile b/Makefile index e232f7f..d705649 100644 --- 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 index 0000000..273e4c6 --- /dev/null +++ b/policy-disable-rc.d @@ -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 diff --git a/proxinstall b/proxinstall index c9d17f1..bad877f 100755 --- a/proxinstall +++ b/proxinstall @@ -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");