[Ocfs2-tools-commits] jlbec commits r948 - in trunk: debian vendor/common

svn-commits at oss.oracle.com svn-commits at oss.oracle.com
Tue Jun 14 20:56:08 CDT 2005


Author: jlbec
Date: 2005-06-14 20:56:06 -0500 (Tue, 14 Jun 2005)
New Revision: 948

Added:
   trunk/debian/ocfs2-tools.install
   trunk/debian/ocfs2console.install
Removed:
   trunk/debian/ocfs2-tools.files
   trunk/debian/ocfs2console.files
Modified:
   trunk/debian/rules
   trunk/vendor/common/o2cb.init
Log:

o Move to dh_install like any modern deb
o Fix o2cb to configure /etc/sysconfig|/etc/default automagically.



Deleted: trunk/debian/ocfs2-tools.files
===================================================================
--- trunk/debian/ocfs2-tools.files	2005-06-15 01:39:02 UTC (rev 947)
+++ trunk/debian/ocfs2-tools.files	2005-06-15 01:56:06 UTC (rev 948)
@@ -1,9 +0,0 @@
-sbin/fsck.ocfs2
-sbin/mkfs.ocfs2
-sbin/mounted.ocfs2
-sbin/tunefs.ocfs2
-sbin/debugfs.ocfs2
-sbin/o2cb_ctl
-sbin/mount.ocfs2
-sbin/ocfs2cdsl
-sbin/ocfs2_hb_ctl

Copied: trunk/debian/ocfs2-tools.install (from rev 946, trunk/debian/ocfs2-tools.files)
===================================================================
--- trunk/debian/ocfs2-tools.files	2005-06-15 00:23:03 UTC (rev 946)
+++ trunk/debian/ocfs2-tools.install	2005-06-15 01:56:06 UTC (rev 948)
@@ -0,0 +1,9 @@
+debian/tmp/sbin/fsck.ocfs2
+debian/tmp/sbin/mkfs.ocfs2
+debian/tmp/sbin/mounted.ocfs2
+debian/tmp/sbin/tunefs.ocfs2
+debian/tmp/sbin/debugfs.ocfs2
+debian/tmp/sbin/o2cb_ctl
+debian/tmp/sbin/mount.ocfs2
+debian/tmp/sbin/ocfs2cdsl
+debian/tmp/sbin/ocfs2_hb_ctl

Deleted: trunk/debian/ocfs2console.files
===================================================================
--- trunk/debian/ocfs2console.files	2005-06-15 01:39:02 UTC (rev 947)
+++ trunk/debian/ocfs2console.files	2005-06-15 01:56:06 UTC (rev 948)
@@ -1,2 +0,0 @@
-usr/lib/python2.3
-usr/sbin/ocfs2console

Copied: trunk/debian/ocfs2console.install (from rev 946, trunk/debian/ocfs2console.files)
===================================================================
--- trunk/debian/ocfs2console.files	2005-06-15 00:23:03 UTC (rev 946)
+++ trunk/debian/ocfs2console.install	2005-06-15 01:56:06 UTC (rev 948)
@@ -0,0 +1,2 @@
+debian/tmp/usr/lib/python2.3
+debian/tmp/usr/sbin/ocfs2console

Modified: trunk/debian/rules
===================================================================
--- trunk/debian/rules	2005-06-15 01:39:02 UTC (rev 947)
+++ trunk/debian/rules	2005-06-15 01:56:06 UTC (rev 948)
@@ -43,8 +43,7 @@
 
 	$(MAKE) DESTDIR=`pwd`/debian/tmp install
 
-# We're using compat of 3
-#	dh_install
+	dh_install
 
 # This single target is used to build all the packages, all at once, or
 # one at a time. So keep in mind: any options passed to commands here will
@@ -55,7 +54,7 @@
 	dh_testroot
 
 	# debhelper V3 compat level
-	dh_movefiles
+	#dh_movefiles
 
 	dh_installchangelogs
 	dh_installdocs

Modified: trunk/vendor/common/o2cb.init
===================================================================
--- trunk/vendor/common/o2cb.init	2005-06-15 01:39:02 UTC (rev 947)
+++ trunk/vendor/common/o2cb.init	2005-06-15 01:56:06 UTC (rev 948)
@@ -17,11 +17,24 @@
 # Force LC_ALL=C
 export LC_ALL=C
 
-# Source configuration, Red Hat and Novell
-[ -f /etc/sysconfig/o2cb ] && . /etc/sysconfig/o2cb
-# Source configuration, Debian
-[ -f /etc/default/o2cb ] && . /etc/default/o2cb
+if [ -f /etc/sysconfig/o2cb ]
+then
+    # Red Hat and Novell
+    CONFIGURATION=/etc/sysconfig/o2cb
+elif [ -f /etc/default/o2cb ]
+then
+    # Debian
+    CONFIGURATION=/etc/default/o2cb
+elif [ -d /etc/default ]
+then
+    CONFIGURATION=/etc/default/o2cb
+else
+    CONFIGURATION=/etc/sysconfig/o2cb
+fi
 
+# Source configuration, 
+[ -f "${CONFIGURATION}" ] && . "${CONFIGURATION}"
+
 # XXX some description of what this does
 LOAD_ACTIONS=("load_module configfs"
 		"mount_fs configfs /config"
@@ -66,7 +79,7 @@
 write_sysconfig()
 {
     echo -n "Writing O2CB configuration: "
-    cat >/etc/sysconfig/o2cb <<EOF
+    cat >"${CONFIGURATION}" <<EOF
 #
 # This is a configuration file for automatic startup of the O2CB
 # driver.  It is generated by running /etc/init.d/o2cb configure.



More information about the Ocfs2-tools-commits mailing list