Unable to install etckeeper with FAI - triggers break

Andrew Ruthven <[email protected]>
Newsgroups gmane.linux.debian.fai
Message-ID <[email protected]>
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@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
[email protected] |
Catalyst Cloud: | This space intentionally left blank
https://catalystcloud.nz |
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.