forked from I2P_Developers/i2p.i2p
Debian: Fix postinst script
On systems without an i2psvc group, the postinstall would fail. This change will add the group if it doesn't exist. Also adding "||true" to the usermod command in case the command returns a non-zero status.
This commit is contained in:
13
debian/changelog
vendored
13
debian/changelog
vendored
@@ -1,10 +1,16 @@
|
||||
i2p (0.8.12-1) stable; urgency=medium
|
||||
i2p (0.8.12-2) stable; urgency=low
|
||||
|
||||
* postinst: Don't fail if the i2psvc group doesn't exist
|
||||
|
||||
-- Kill Your TV <killyourtv@i2pmail.org> Fri, 06 Jan 2012 18:43:09 +0000
|
||||
|
||||
i2p (0.8.12-1) stable; urgency=low
|
||||
|
||||
* New upstream I2P release
|
||||
* Debconf:
|
||||
- add wrapper.java.maxmemory from wrapper.config
|
||||
- The warning about the daemon user needing to exist was confusing to some
|
||||
that assumed this meant that i2psvc had to exist. This warning has been
|
||||
that assumed this meant that i2psvc had to exit. This warning has been
|
||||
clarified.
|
||||
- Spanish, Swedish, Ukrainian translation updates
|
||||
* Initscript changes/fixes:
|
||||
@@ -13,14 +19,13 @@ i2p (0.8.12-1) stable; urgency=medium
|
||||
wrapper versions)
|
||||
- move I2PTEMP to /tmp/i2p-daemon
|
||||
- move router.ping to /var/run/i2p
|
||||
- chown /var/log/i2p to i2psvc:i2psvc instead of i2psvc:adm
|
||||
- various other clean-ups
|
||||
- explicity redirect errors to stderr
|
||||
* maintainer scripts:
|
||||
- postinst: rewrite the handling of an existing i2psvc account
|
||||
- postrm: remove /etc/default/i2p if the package is purged
|
||||
|
||||
-- Kill Your TV <killyourtv@i2pmail.org> Thu, 05 Jan 2012 00:00:00 +0000
|
||||
-- Kill Your TV <killyourtv@i2pmail.org> Fri, 06 Jan 2012 02:49:03 +0000
|
||||
|
||||
i2p (0.8.11-2) stable; urgency=medium
|
||||
|
||||
|
5
debian/i2p.postinst
vendored
5
debian/i2p.postinst
vendored
@@ -63,14 +63,15 @@ case "$1" in
|
||||
|
||||
# Create user and group as a system user.
|
||||
if getent passwd i2psvc > /dev/null 2>&1 ; then
|
||||
groupadd -f $I2PSYSUSER || true
|
||||
usermod -c "I2P Router Daemon" -d $I2PHOME -g $I2PSYSUSER -s "/bin/false" \
|
||||
$I2PSYSUSER -e 1 > /dev/null 2>&1
|
||||
$I2PSYSUSER -e 1 > /dev/null 2>&1 || true
|
||||
else
|
||||
adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER
|
||||
fi
|
||||
|
||||
[ -d /var/log/i2p ] || mkdir -m0750 /var/log/i2p
|
||||
chown -f -R $I2PSYSUSER:adm /var/log/i2p
|
||||
chown -f -R $I2PSYSUSER:i2psvc /var/log/i2p
|
||||
|
||||
# Has someone set the permissions with dpkg-statoverride? If so, obey them.
|
||||
if ! dpkg-statoverride --list $I2PHOME > /dev/null 2>&1
|
||||
|
Reference in New Issue
Block a user