I2P Address: [http://git.idk.i2p]

Skip to content
Snippets Groups Projects
Commit 0c81d519 authored by kytv's avatar kytv
Browse files

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.
parent 5067499f
No related branches found
No related tags found
No related merge requests found
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 * New upstream I2P release
* Debconf: * Debconf:
- add wrapper.java.maxmemory from wrapper.config - add wrapper.java.maxmemory from wrapper.config
- The warning about the daemon user needing to exist was confusing to some - 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. clarified.
- Spanish, Swedish, Ukrainian translation updates - Spanish, Swedish, Ukrainian translation updates
* Initscript changes/fixes: * Initscript changes/fixes:
...@@ -13,14 +19,13 @@ i2p (0.8.12-1) stable; urgency=medium ...@@ -13,14 +19,13 @@ i2p (0.8.12-1) stable; urgency=medium
wrapper versions) wrapper versions)
- move I2PTEMP to /tmp/i2p-daemon - move I2PTEMP to /tmp/i2p-daemon
- move router.ping to /var/run/i2p - move router.ping to /var/run/i2p
- chown /var/log/i2p to i2psvc:i2psvc instead of i2psvc:adm
- various other clean-ups - various other clean-ups
- explicity redirect errors to stderr - explicity redirect errors to stderr
* maintainer scripts: * maintainer scripts:
- postinst: rewrite the handling of an existing i2psvc account - postinst: rewrite the handling of an existing i2psvc account
- postrm: remove /etc/default/i2p if the package is purged - 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 i2p (0.8.11-2) stable; urgency=medium
......
...@@ -63,14 +63,15 @@ case "$1" in ...@@ -63,14 +63,15 @@ case "$1" in
# Create user and group as a system user. # Create user and group as a system user.
if getent passwd i2psvc > /dev/null 2>&1 ; then 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" \ 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 else
adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER adduser --system --quiet --group --home $I2PHOME $I2PSYSUSER
fi fi
[ -d /var/log/i2p ] || mkdir -m0750 /var/log/i2p [ -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. # Has someone set the permissions with dpkg-statoverride? If so, obey them.
if ! dpkg-statoverride --list $I2PHOME > /dev/null 2>&1 if ! dpkg-statoverride --list $I2PHOME > /dev/null 2>&1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment