[pve-devel] [RFC installer] Revert "drop unused policy-disable-rc.d"
Stoiko Ivanov
s.ivanov at proxmox.com
Wed Feb 19 11:54:09 CET 2020
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 at proxmox.com>
---
Sent as RFC because I'm not sure whether the tradeoff between:
* forcing us to fix bugs in our maint-scripts
* forcing us to deal with problems in upstream maint-scripts
Makefile | 2 ++
policy-disable-rc.d | 7 +++++++
proxinstall | 7 ++++++-
3 files changed, 15 insertions(+), 1 deletion(-)
create mode 100755 policy-disable-rc.d
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 a87f1c7..86e6435 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");
--
2.20.1
More information about the pve-devel
mailing list