[SCM] Git repository for pkg-virtuoso branch, master, updated. upstream/6.0.1.cvs20091210+dfsg2-200-gb385a07
Obey Arthur Liu
arthur at milliways.fr
Sat Oct 30 10:47:05 UTC 2010
The following commit has been merged in the master branch:
commit 4f8140ea3a87485b1a85e3d494d791d15785ff31
Author: Obey Arthur Liu <arthur at milliways.fr>
Date: Sun Jul 11 23:08:34 2010 -0700
Minimalize /etc/default mangling in postinst
diff --git a/debian/virtuoso-opensource-6.1.init b/debian/virtuoso-opensource-6.1.init
index d6d06eb..06f2437 100644
--- a/debian/virtuoso-opensource-6.1.init
+++ b/debian/virtuoso-opensource-6.1.init
@@ -79,7 +79,7 @@ fi
# Use this if you want the user to explicitly set 'RUN' in
# /etc/default/
-if [ "x$RUN" != "xyes" ] ; then
+if [ "x$RUN" != "xyes" -a "x$2" != "xignoredefault" ] ; then
log_failure_msg "$NAME disabled, /etc/default/$NAME."
exit 0
fi
diff --git a/debian/virtuoso-opensource-6.1.postinst b/debian/virtuoso-opensource-6.1.postinst
index fb0d6bc..4d3e559 100644
--- a/debian/virtuoso-opensource-6.1.postinst
+++ b/debian/virtuoso-opensource-6.1.postinst
@@ -64,13 +64,8 @@ $INI_PLUGINS +value /usr/lib/virtuoso-opensource-6.1/hosting || true
# we need to start the service to change the passwords so the
# debhelper code gets dumped and we'll do it here instead...
if [ -x "/etc/init.d/virtuoso-opensource-6.1" ]; then
- sed "s/RUN=no/RUN=yes/" -i /etc/default/virtuoso-opensource-6.1
update-rc.d virtuoso-opensource-6.1 defaults > /dev/null
- if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
- invoke-rc.d virtuoso-opensource-6.1 start && VT_EXIT=$?
- else
- /etc/init.d/virtuoso-opensource-6.1 start && VT_EXIT=$?
- fi
+ invoke-rc.d virtuoso-opensource-6.1 start ignoredefault && VT_EXIT=$?
fi
# get the new admin password
@@ -108,12 +103,10 @@ if [ $VT_EXIT ] && [ -n "$DBA_PW" ]; then
fi
else
# the password was not changed for some reason
- sed "s/RUN=yes/RUN=no/" -i /etc/default/virtuoso-opensource-6.1
db_input critical virtuoso-opensource-6.1/error-setting-password || true
fi
else
# error connecting to server or non-default password
- sed "s/RUN=yes/RUN=no/" -i /etc/default/virtuoso-opensource-6.1
db_input critical virtuoso-opensource-6.1/error-setting-password || true
fi
@@ -129,20 +122,18 @@ else
echo "The Virtuoso daemon has been disabled for security reasons."
echo "You can reconfigure the package to change these passwords."
db_input high virtuoso-opensource-6.1/note-disabled || true
- else
- # should only get here on a reconfigure with no new password;
- # looks safe, so let's just put everything back how we found it
- if [ -n $RUN ]; then
- sed "s/RUN=yes/RUN=$RUN/" -i /etc/default/virtuoso-opensource-6.1
- fi
fi
else
# couldn't even start the daemon, something's broken!
- sed "s/RUN=yes/RUN=no/" -i /etc/default/virtuoso-opensource-6.1
db_input critical virtuoso-opensource-6.1/error-setting-password || true
fi
fi
+# Stop the server if it was force-started
+if [ "x$RUN" == "xno" -a -x "/etc/init.d/virtuoso-opensource-6.1" ]; then
+ invoke-rc.d virtuoso-opensource-6.1 stop ignoredefault && VT_EXIT=$?
+fi
+
db_go || true
db_stop && exit
--
Git repository for pkg-virtuoso
More information about the Pkg-virtuoso-commits
mailing list