[pinto] 01/01: Recreate /var/run/pinto on every pintod start if folder does not exist. Folder could be removed during boot.

Oleg Gashev oleg at gashev.net
Sat Sep 21 14:18:08 UTC 2013


This is an automated email from the git hooks/post-receive script.

gashev-guest pushed a commit to branch master
in repository pinto.

commit 23081cbe4117ddb85c99f034a3dd21811dfbbf00
Author: Oleg Gashev <oleg at gashev.net>
Date:   Sat Sep 21 14:16:49 2013 +0000

    Recreate /var/run/pinto on every pintod start if folder does not exist. Folder could be removed during boot.
---
 debian/pinto.init     |    4 ++++
 debian/pinto.postinst |    6 ------
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/debian/pinto.init b/debian/pinto.init
index eb37785..1771815 100644
--- a/debian/pinto.init
+++ b/debian/pinto.init
@@ -40,6 +40,10 @@ check_started() {
 start() {
     if ! check_started; then
         log_daemon_msg "Starting $DESC" "$NAME"
+
+        # Could be removed during boot
+        test -e /var/run/pinto || install -m 750 -o pinto -g pinto -d /var/run/pinto
+
         if ! START_ERROR=`start-stop-daemon --chuid pinto -u pinto --start --pidfile $PIDFILE --exec $DAEMON -- $PINTOD_OPTS --pid $PIDFILE 2>&1`; then
             echo -n " "
             log_action_end_msg 1 "$START_ERROR"
diff --git a/debian/pinto.postinst b/debian/pinto.postinst
index 20c604a..0ef4b7a 100644
--- a/debian/pinto.postinst
+++ b/debian/pinto.postinst
@@ -21,12 +21,6 @@ if [ "$1" = configure ]; then
         echo "and exec /usr/bin/pinto -r $defaultRepositoryPath init."
     fi
 
-	if [ ! -e /var/run/pinto ] ; then
-		mkdir -p /var/run/pinto
-		chown pinto:pinto /var/run/pinto
-		chmod 0750 /var/run/pinto
-	fi
-
     if [ ! -e /var/log/pinto ] ; then
         mkdir -p /var/log/pinto
         chown pinto:adm /var/log/pinto

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/pinto.git



More information about the Pkg-perl-cvs-commits mailing list