[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[glibc] 02/09: debian/debhelper.in/nscd.init: add support for the try-restart argument to nscd's init script.



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

aurel32 pushed a commit to branch glibc-2.25
in repository glibc.

commit b5c00ce2e62f18e646e7b67a5e0d6999dbf5714c
Author: Aurelien Jarno <aurelien@aurel32.net>
Date:   Sat Aug 26 15:44:31 2017 +0200

    debian/debhelper.in/nscd.init: add support for the try-restart argument to nscd's init script.
---
 debian/changelog              |  2 ++
 debian/debhelper.in/nscd.init | 15 +++++++++++++++
 2 files changed, 17 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index 342445e..f2273eb 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,8 @@ glibc (2.25-0experimental2) UNRELEASED; urgency=medium
   * debian/patches/git-updates.diff: update from upstream stable branch.
   * debian/rules.d/build.mk: reduce TIMEOUTFACTOR to 15 from 25. This should
     fix FTBFS on HPPA.
+  * debian/debhelper.in/nscd.init: add support for the try-restart argument
+    to nscd's init script.
 
  -- Aurelien Jarno <aurel32@debian.org>  Sun, 20 Aug 2017 19:05:48 +0200
 
diff --git a/debian/debhelper.in/nscd.init b/debian/debhelper.in/nscd.init
index cc58184..4eeeb9e 100644
--- a/debian/debhelper.in/nscd.init
+++ b/debian/debhelper.in/nscd.init
@@ -115,6 +115,21 @@ restart|force-reload)
 		;;
 	esac
 	;;
+try-restart)
+	log_daemon_msg "Trying to restart $DESC" "$NAME"
+	stop_nscd
+	case "$?" in
+		0)
+			start_nscd
+			case "$?" in
+				0) invalidate_cache ; log_end_msg 0 ; exit 0 ;;
+				*) log_failure_msg " (failed to start)." ; exit 1 ;;
+			esac
+			;;
+		1) log_success_msg "(not running)." ; exit 0 ;;
+		*) log_failure_msg "(failed to stop)." ; exit 1 ;;
+	esac
+	;;
 status)
 	log_daemon_msg "Status of $DESC service: "
 	status

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


Reply to: