]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
rpm: Fix undefined FIRST_ARG 14346/head
authorBoris Ranto <branto@redhat.com>
Fri, 7 Jul 2017 10:37:55 +0000 (12:37 +0200)
committerBoris Ranto <branto@redhat.com>
Fri, 7 Jul 2017 14:27:24 +0000 (16:27 +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 2a16e98835365d7c647802480040ece8e4516f47..c74e054e99fdfc1c052474910b1df7e5124a355c 100644 (file)
@@ -830,6 +830,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