[Pkg-ocaml-maint-commits] [SCM] mldonkey packaging branch, master, updated. debian/3.0.3-2-1-gef2b3c0
Mehdi Dogguy
mehdi at debian.org
Mon Oct 25 11:10:57 UTC 2010
The following commit has been merged in the master branch:
commit ef2b3c032d3d00a68d754347e47b059ac55d00f6
Author: Mehdi Dogguy <mehdi at debian.org>
Date: Mon Oct 25 13:07:11 2010 +0200
Do not erase existing configuration on upgrades (Closes: #601332).
diff --git a/debian/changelog b/debian/changelog
index 4cdbd46..46bf264 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,9 @@
+mldonkey (3.0.3-3) unstable; urgency=low
+
+ * Do not erase existing configuration on upgrades (Closes: #601332).
+
+ -- Mehdi Dogguy <mehdi at debian.org> Mon, 25 Oct 2010 12:42:28 +0200
+
mldonkey (3.0.3-2) unstable; urgency=low
* Add myself to Uploaders
diff --git a/debian/mldonkey-server.postinst b/debian/mldonkey-server.postinst
index a5ce7b9..efb88a3 100644
--- a/debian/mldonkey-server.postinst
+++ b/debian/mldonkey-server.postinst
@@ -25,13 +25,28 @@ case "$1" in
##################
mldonkey_umask=0022
- umask $mldonkey_umask
-
run_as_user=mldonkey
mldonkey_group=mldonkey
new_mldonkey_dir="/var/lib/mldonkey"
client_name=`hostname`
+ if [ -e "$CONF" ]; then
+ source $CONF;
+ if [ -n "$MLDONKEY_USER" ]; then
+ run_as_user="$MLDONKEY_USER";
+ fi
+ if [ -n "$MLDONKEY_GROUP" ]; then
+ mldonkey_group="$MLDONKEY_GROUP";
+ fi
+ if [ -n "$MLDONKEY_DIR" ]; then
+ new_mldonkey_dir="$MLDONKEY_DIR";
+ fi
+ if [ -n "$MLDONKEY_UMASK" ]; then
+ mldonkey_umask="$MLDONKEY_UMASK";
+ fi
+ fi
+ umask $mldonkey_umask
+
###################
# User management #
###################
@@ -63,23 +78,16 @@ case "$1" in
# Downloads.ini #
#################
- if [ -e "$new_mldonkey_dir/downloads.ini" ]; then
- $DEBUG && echo -n "Creating backup of $new_mldonkey_dir/downloads.ini: "
- cp -p -f "$new_mldonkey_dir/downloads.ini" "$new_mldonkey_dir/downloads.ini.dpkg"
- $DEBUG && echo "done."
- else
- $DEBUG && echo -n "Creating empty $new_mldonkey_dir/downloads.ini: "
+ if [ ! -e "$new_mldonkey_dir/downloads.ini" ]; then
+ $DEBUG && echo -n "Creating a new $new_mldonkey_dir/downloads.ini: "
touch "$new_mldonkey_dir/downloads.ini"
- $DEBUG && echo "done."
- fi
-
- $DEBUG && echo -n "Writing new values to $new_mldonkey_dir/downloads.ini: "
- cat > "$new_mldonkey_dir/downloads.ini" <<EOF
+ cat > "$new_mldonkey_dir/downloads.ini" <<EOF
run_as_useruid=$run_as_useruid
run_as_user="$run_as_user"
client_name="$client_name"
EOF
- $DEBUG && echo "done."
+ $DEBUG && echo "done."
+ fi
#############
# Files.ini #
--
mldonkey packaging
More information about the Pkg-ocaml-maint-commits
mailing list