gfs2-utils: master - GFS2: Make mkfs.gfs2 install to the correct location

Steven Whitehouse swhiteho at fedoraproject.org
Fri Oct 1 09:48:08 UTC 2010


Gitweb:        http://git.fedorahosted.org/git/gfs2-utils.git?p=gfs2-utils.git;a=commitdiff;h=bb24408b4dc8d49de583001eefa87ea46de89028
Commit:        bb24408b4dc8d49de583001eefa87ea46de89028
Parent:        e7fb6bc9caff6fd68e216494eb2d810e88b38867
Author:        Steven Whitehouse <swhiteho at redhat.com>
AuthorDate:    Fri Oct 1 10:23:45 2010 +0100
Committer:     Steven Whitehouse <swhiteho at redhat.com>
CommitterDate: Fri Oct 1 10:23:45 2010 +0100

GFS2: Make mkfs.gfs2 install to the correct location

The FHS says that mkfs.* should be in /sbin. This patch copies the
boilerplate automake code from fsck.gfs2 in order to ensure that
mkfs.gfs2 lands up in the correct location.

Signed-off-by: Steven Whitehouse <swhiteho at redhat.com>
---
 gfs2/mkfs/Makefile.am |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/gfs2/mkfs/Makefile.am b/gfs2/mkfs/Makefile.am
index 75466fa..3e72026 100644
--- a/gfs2/mkfs/Makefile.am
+++ b/gfs2/mkfs/Makefile.am
@@ -1,9 +1,13 @@
 MAINTAINERCLEANFILES	= Makefile.in
 
-# install into /sbin, not /usr/sbin
-sbindir := $(shell test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
-	     && echo /sbin \
-	     || echo '$(exec_prefix)/sbin')
+# When an exec_prefix setting would have us install into /usr/sbin,
+# use /sbin instead.
+# Accept an existing sbindir value of /usr/sbin (probably for older automake),
+# or an empty value, for automake-1.11 and newer.
+sbindir := $(shell rpl=0; test '$(exec_prefix):$(sbindir)' = /usr:/usr/sbin \
+		       || test '$(exec_prefix):$(sbindir)' = /usr: && rpl=1; \
+	     test $$rpl = 1 && echo /sbin || echo '$(exec_prefix)/sbin')
+
 
 sbin_PROGRAMS		= mkfs.gfs2
 


More information about the cluster-commits mailing list