[Pkg-iscsi-maintainers] [SCM] Debian iscsitarget packaging branch, master, updated. debian/1.4.20.1-1-19-g93209e4

Ritesh Raj Sarraf rrs at researchut.com
Sat Jun 5 17:26:21 UTC 2010


The following commit has been merged in the master branch:
commit e9ecfbcdaf182a383b3fe535836462f8ecaf0521
Author: Ritesh Raj Sarraf <rrs at researchut.com>
Date:   Sat Jun 5 21:51:59 2010 +0530

    handle old config file

diff --git a/debian/changelog b/debian/changelog
index a4f0295..3e48825 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -8,8 +8,10 @@ iscsitarget (1.4.20.1-2) UNRELEASED; urgency=low
     deprecated upstream 
   * Switch config files directory to /etc/ietd as upstream recommends it and
     document this change in NEWS.Debian 
+  * Add post-installation script to handle migration of old config file to the
+    new location 
 
- -- Ritesh Raj Sarraf <rrs at debian.org>  Mon, 17 May 2010 11:59:05 +0530
+ -- Ritesh Raj Sarraf <rrs at debian.org>  Sat, 05 Jun 2010 21:51:21 +0530
 
 iscsitarget (1.4.20.1-1) unstable; urgency=low
 
diff --git a/debian/iscsitarget.postinst.migrateTo1420 b/debian/iscsitarget.postinst.migrateTo1420
new file mode 100644
index 0000000..935d673
--- /dev/null
+++ b/debian/iscsitarget.postinst.migrateTo1420
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+set -e
+
+case "$1" in
+  configure)
+	if [ -f /etc/ietd.conf ]; then
+		mv -f /etc/ietd.conf /etc/ietd/
+		echo -en "Moving config to new location /etc/ietd/\n"
+	fi
+
+	if [ -f /etc/initiators.allow ]; then
+		mv -f /etc/initiators.allow /etc/ietd/
+		echo -en "Moving config to new location /etc/ietd/\n"
+	fi
+
+	if [ -f /etc/initiators.deny ]; then
+		mv -f /etc/initiators.deny /etc/ietd/
+		echo -en "Moving config to new location /etc/ietd/\n"
+	fi
+  ;;
+  abort-upgrade|abort-remove|abort-deconfigure|triggered)
+  ;;
+  *)
+    echo "postinst called with unknown argument \`$1'" >&2
+    exit 1;
+  ;;
+esac
+
+
+#DEBHELPER#
+
+exit 0

-- 
Debian iscsitarget packaging



More information about the Pkg-iscsi-maintainers mailing list