Unable to install etckeeper with FAI - triggers break

Andrew Ruthven andrew at etc.gen.nz
Thu Jan 5 08:54:28 CET 2023


Hey,

I've run into an interesting issue now that I've updated an nfsroot to
Bullseye. The change to using unshare in $ROOTCMD in v5.10 is breaking
the dpkg trigger for etckeeper.

The trigger runs: etckeeper post-install, when in turn runs
/etc/etckeeper/post-install.d/50vcs-commit which has in it:

ETCKEEPER_PID=$( ps --no-headers -o ppid "${PPID}" 2>/dev/null | sed
's/^ *//' )

But $PPID is 1, which then causes ETCKEEPER_PID to be set to 0, which
then breaks a later call of ps.

If I change $ROOTCMD to be: unshare --fork --kill-child --mount-proc
chroot /target

Then the trigger runs correctly.

This is what is displayed when it breaks:

-- BEGIN --
root at cc-porwal-prod-kvm1:/# $ROOTCMD etckeeper post-install
error: process ID out of range

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).
error: garbage option

Usage:
ps [options]

Try 'ps --help <simple|list|output|threads|misc|all>'
or 'ps --help <s|l|o|t|m|a>'
for additional help text.

For more details see ps(1).
-- END --

After editing /usr/sbin/fai and removing ' --pid' I get a successful
installation, complete with etckeeper.

Any thoughts?  (Well, other than not installing etckeeper!)

Cheers,
Andrew

-- 
Andrew Ruthven, Wellington, New Zealand
andrew at etc.gen.nz |
Catalyst Cloud: | This space intentionally left blank
https://catalystcloud.nz |

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20230105/7ef98268/attachment.html>


More information about the linux-fai mailing list