]> git.pld-linux.org Git - packages/nagios-plugin-check_raid.git/commitdiff
make scriptlets debian compatible (via alien)
authorElan Ruusamäe <glen@pld-linux.org>
Fri, 16 Jun 2017 12:35:04 +0000 (15:35 +0300)
committerElan Ruusamäe <glen@pld-linux.org>
Fri, 16 Jun 2017 12:35:13 +0000 (15:35 +0300)
fakeroot alien --scripts -d -k nagios-plugin-check_raid-4.0.6-1.noarch.rpm

nagios-plugin-check_raid.spec

index 4fe4b1884d6854ccf63b7cdf5584d7f00a652b64..c4b24aec04d9cc3d3bf265a560b07cf989e63777 100644 (file)
@@ -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
This page took 0.052169 seconds and 4 git commands to generate.