[packages/nagios-plugin-check_raid] make scriptlets debian compatible (via alien)

glen glen at pld-linux.org
Fri Jun 16 14:35:37 CEST 2017


commit 46a85d79f66617da09c203a475c36d9a4ec209f6
Author: Elan Ruusamäe <glen at pld-linux.org>
Date:   Fri Jun 16 15:35:04 2017 +0300

    make scriptlets debian compatible (via alien)
    
    fakeroot alien --scripts -d -k nagios-plugin-check_raid-4.0.6-1.noarch.rpm

 nagios-plugin-check_raid.spec | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/nagios-plugin-check_raid.spec b/nagios-plugin-check_raid.spec
index 4fe4b18..c4b24ae 100644
--- a/nagios-plugin-check_raid.spec
+++ b/nagios-plugin-check_raid.spec
@@ -115,12 +115,12 @@ rm -rf $RPM_BUILD_ROOT
 # - if separate config file is used
 grep -q '^#includedir /etc/sudoers\.d' /etc/sudoers && confd=1
 
-if [ "$1" = 1 -o "$confd" = 1 ]; then
+if [ "$1" = 1 ] || [ "$1" = "configure" ] || [ "$confd" = 1 ]; then
 	%{plugindir}/%{plugin} -S || :
 fi
 
 %postun
-if [ "$1" = 0 ]; then
+if [ "$1" = "0" ] || [ "$1" = "remove" ]; then
 	# remove all sudo rules related to us
 	%{__sed} -i -e '/CHECK_RAID/d' /etc/sudoers
 fi
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/nagios-plugin-check_raid.git/commitdiff/46a85d79f66617da09c203a475c36d9a4ec209f6



More information about the pld-cvs-commit mailing list