Re: dpkg-statoverride question
On Tue, Sep 24, 2002 at 02:00:20PM +1000, Brian May wrote:
> In my amavis-postfix postinst file, I have:
> case "$1" in
> adduser --system --home /var/lib/amavis --no-create-home amavis
> for i in /var/lib/amavis /var/lib/amavis/virusmails /var/run/amavis
> if ! dpkg-statoverride --list $i >/dev/null
> dpkg-statoverride --update --add amavis root 755 $i
> I was under the impression that this would allow overriding
> the ownership of the file outside the package.
Should do, yes.
> However, every time I reinstall the package, it goes back to
> the defaults.
> Just to make sure, I typed in "dpkg-statoverride --list /var/lib/amavis"
> before and after, and it is correct before, but wrong afterwords.
> For the record, I have Russell's SE-Linux version of dpkg but recompiled
> for woody. It is based on version 1.9.21.
> Any ideas?
That looks weird. Perhaps you could remove the '>/dev/null' and also
put in a call to dpkg-statoverride followed by "echo $?" so we can see
> (PS: that adduser code is also a bit dodgy, currently it removes
> the user and re-adds it on upgrades; suggestions for a better place
> to put this, and the corresponding remove user call appreciated ;-).
adduser doesn't readd an already existing user; does that help?
Julian Gilbey, Dept of Maths, Queen Mary, Univ. of London
Debian GNU/Linux Developer, see: http://people.debian.org/~jdg/
Visit http://www.thehungersite.com/ to help feed the hungry