]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: Fix undefined FIRST_ARG 15509/head
authorBoris Ranto <branto@redhat.com>
Fri, 7 Jul 2017 10:37:55 +0000 (12:37 +0200)
committerBoris Ranto <branto@redhat.com>
Thu, 20 Jul 2017 13:55:07 +0000 (15:55 +0200)
If FIRST_ARG is undefined, the rpms will show an error on upgrade
because the condition in the postun script gets broken.

This was a regression introduced by commit for issue 20077 that moved
ceph-disk unit files to ceph-base.

Fixes: http://tracker.ceph.com/issues/20077
Signed-off-by: Boris Ranto <branto@redhat.com>
(cherry picked from commit 562816914ccca8e4e7d9c31f333db2f0da6f7c99)

ceph.spec.in

index d2dc82634eeef510a267c4ce24818a165869afa7..3d391bb406882dd1f1f9b5eaa9decdab90cb24c3 100644 (file)
@@ -908,6 +908,7 @@ fi
 
 %postun base
 /sbin/ldconfig
+test -n "$FIRST_ARG" || FIRST_ARG=$1
 %if 0%{?suse_version}
 DISABLE_RESTART_ON_UPDATE="yes"
 %service_del_postun ceph-disk@\*.service ceph.target