[Pkg-ocaml-maint-commits] r2945 -
/trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst
smimram at users.alioth.debian.org
smimram at users.alioth.debian.org
Thu Jul 13 19:06:52 UTC 2006
Author: smimram
Date: Thu Jul 13 19:06:52 2006
New Revision: 2945
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/?sc=1&rev=2945
Log:
Cosmetic.
Modified:
trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst
Modified: trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst
URL: http://svn.debian.org/wsvn/pkg-ocaml-maint/trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst?rev=2945&op=diff
==============================================================================
--- trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst (original)
+++ trunk/packages/mldonkey/trunk/debian/mldonkey-server.postinst Thu Jul 13 19:06:52 2006
@@ -5,7 +5,7 @@
DEBUG=false
-db_get mldonkey-server/launch_at_startup
+db_get mldonkey-server/launch_at_startup
launch_at_startup="$RET"
case "$1" in
@@ -18,22 +18,22 @@
###########################
# Handling debconf values #
###########################
-
+
mldonkey_umask=0022
umask $mldonkey_umask
- db_get mldonkey-server/run_as_user
+ db_get mldonkey-server/run_as_user
run_as_user=$RET
- db_get mldonkey-server/mldonkey_group
+ db_get mldonkey-server/mldonkey_group
mldonkey_group=$RET
-
+
db_get mldonkey-server/mldonkey_dir
new_mldonkey_dir="$RET"
db_get mldonkey-server/mldonkey_niceness
mldonkey_niceness="$RET"
-
+
client_name=`/bin/hostname`
enable_directconnect=false
@@ -45,7 +45,7 @@
enable_fasttrack=false
OLD_IFS=$IFS
IFS=", "
- for i in $RET; do
+ for i in $RET; do
case $i in
Directconnect*)
@@ -89,7 +89,7 @@
###################
# User management #
###################
-
+
# Creating MLDonkey group if he isn't already there
if ! getent group $mldonkey_group > /dev/null ; then
$DEBUG && echo -n "Creating mldonkey group: "
@@ -116,7 +116,7 @@
#########################
# Relocation management #
#########################
-
+
if [ -e "$CONF" ]; then
. "$CONF"
if [ -n "$MLDONKEY_DIR" ] && [ -f "$MLDONKEY_DIR/downloads.ini" ]; then
@@ -132,7 +132,7 @@
/bin/chown -R $run_as_user:$mldonkey_group "$MLDONKEY_DIR"
$DEBUG && echo "done."
fi
-
+
db_get mldonkey-server/mldonkey_move
if [ "$RET" = "true" ] && [ "$new_mldonkey_dir" != "$MLDONKEY_DIR" ]; then
$DEBUG && echo -n "Moving file of $MLDONKEY_DIR to $new_mldonkey_dir: "
@@ -141,11 +141,11 @@
fi
fi
fi
-
+
#################
# Downloads.ini #
#################
-
+
if [ -e "$new_mldonkey_dir/downloads.ini" ]; then
$DEBUG && echo -n "Creating backup of $new_mldonkey_dir/downloads.ini: "
/bin/cp -p -f "$new_mldonkey_dir/downloads.ini" "$new_mldonkey_dir/downloads.ini.dpkg"
@@ -155,7 +155,7 @@
/bin/touch "$new_mldonkey_dir/downloads.ini"
$DEBUG && echo "done."
fi
-
+
$DEBUG && echo -n "Writing new values to $new_mldonkey_dir/downloads.ini: "
/usr/bin/mldonkey_options -f "$new_mldonkey_dir/downloads.ini" <<EOF
run_as_useruid=$run_as_useruid
@@ -172,13 +172,13 @@
max_hard_download_rate=$max_hard_download_rate
EOF
$DEBUG && echo "done."
-
+
#############
# Files.ini #
#############
-
+
# Handling fasttrack file split here, better than in the mldonkey-server.init
-
+
if [ -e "$new_mldonkey_dir/files.ini" ] \
&& [ ! -e "$new_mldonkey_dir/files.ini.fasttrack" ] \
&& /usr/bin/mldonkey_files --test Fasttrack -q -f0 "$new_mldonkey_dir/files.ini"; then
@@ -194,7 +194,7 @@
#############
# Users.ini #
#############
-
+
if [ -e "$new_mldonkey_dir/downloads.ini" ] && \
/usr/bin/mldonkey_users --test-users-section -q -f "$new_mldonkey_dir/downloads.ini"; then
if [ -e "$new_mldonkey_dir/users.ini" ]; then
@@ -210,7 +210,7 @@
$DEBUG && echo "done."
fi
fi
-
+
if [ -n "$password" ]; then
if [ -e "$new_mldonkey_dir/users.ini" ]; then
$DEBUG && echo -n "Creating backup of $new_mldonkey_dir/users.ini: "
@@ -226,7 +226,7 @@
/usr/bin/mldonkey_users --add admin -q -f "$new_mldonkey_dir/users.ini" -p $password
$DEBUG && echo "done."
fi
-
+
####################
# Files permission #
####################
@@ -279,7 +279,7 @@
################################
# /etc/default/mldonkey-server #
################################
-
+
CONF_NEW=`/bin/tempfile`
$DEBUG && echo -n "Writing new values to $CONF_NEW: "
@@ -305,7 +305,7 @@
abort-upgrade|abort-remove|abort-deconfigure)
;;
- *)
+ *)
echo "postinst called with unknown argument \`$1'" >&2
exit 1
;;
More information about the Pkg-ocaml-maint-commits
mailing list