Use onldebni to automatically run debian operations non-interactively under policy-rc.d protection.

This is useful for automated RFS modifications after first creation.
This commit is contained in:
Jeffrey Townsend
2018-04-15 22:41:28 +00:00
parent fca1b92a9f
commit 736eeadb4d

View File

@@ -0,0 +1,9 @@
#!/bin/bash
/bin/echo -e "#!/bin/sh\\nexit 101" >/usr/sbin/policy-rc.d
chmod +x /usr/sbin/policy-rc.d
export DEBIAN_FRONTEND=noninteractive
export DEBCONF_NONINTERACTIVE_SEEN=true
$@
rc=$?
rm -f /usr/sbin/policy-rc.d
exit $rc