Break HTTP parts of openflow-pki package into new openflow-pki-server package.
authorBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:24:02 +0000 (10:24 -0700)
committerBen Pfaff <blp@nicira.com>
Thu, 30 Oct 2008 17:24:02 +0000 (10:24 -0700)
debian/control.in
debian/openflow-pki-server.apache2 [moved from debian/openflow-pki.apache2 with 100% similarity]
debian/openflow-pki-server.dirs [moved from debian/openflow-pki.dirs with 100% similarity]
debian/openflow-pki-server.install [moved from debian/openflow-pki.install with 100% similarity]
debian/openflow-pki-server.postinst [new file with mode: 0755]
debian/openflow-pki.postinst
debian/rules

index 65d537f..b7aa8b5 100644 (file)
@@ -39,7 +39,7 @@ Description: OpenFlow switch implementations
 
 Package: openflow-pki
 Architecture: all
-Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-common, apache2
+Depends: ${shlibs:Depends}, ${misc:Depends}, openflow-common
 Description: OpenFlow public key infrastructure
  openflow-pki provides PKI (public key infrastructure) support for
  OpenFlow switches and controllers, reducing the risk of
@@ -47,6 +47,18 @@ Description: OpenFlow public key infrastructure
  .
  OpenFlow is a protocol for flow-based control over network switching.
 
+Package: openflow-pki-server
+Architecture: all
+Depends: ${shlibs:Depends}, ${misc:Depends}, ${perl:Depends}, openflow-pki, apache2
+Description: OpenFlow public key infrastructure (HTTP server support)
+ openflow-pki-server provides HTTP access to the OpenFlow PKI (public
+ key infrastructure) maintained on the local machine by the
+ openflow-pki package.  This HTTP access is needed for secure and
+ convenient OpenFlow switch setup using the ofp-switch-setup program
+ in the openflow-switch package.
+ .
+ OpenFlow is a protocol for flow-based control over network switching.
+
 Package: openflow-controller
 Architecture: any
 Depends: ${shlibs:Depends}, openflow-common, openflow-pki
diff --git a/debian/openflow-pki-server.postinst b/debian/openflow-pki-server.postinst
new file mode 100755 (executable)
index 0000000..d161a98
--- /dev/null
@@ -0,0 +1,44 @@
+#!/bin/sh
+# postinst script for openflow
+#
+# see: dh_installdeb(1)
+
+set -e
+
+# summary of how this script can be called:
+#        * <postinst> `configure' <most-recently-configured-version>
+#        * <old-postinst> `abort-upgrade' <new version>
+#        * <conflictor's-postinst> `abort-remove' `in-favour' <package>
+#          <new-version>
+#        * <postinst> `abort-remove'
+#        * <deconfigured's-postinst> `abort-deconfigure' `in-favour'
+#          <failed-install-package> <version> `removing'
+#          <conflicting-package> <version>
+# for details, see http://www.debian.org/doc/debian-policy/ or
+# the debian-policy package
+
+case "$1" in
+    configure)
+        # Enable site under Apache.
+        a2ensite openflow-pki >/dev/null
+        if command -v invoke-rc.d >/dev/null 2>&1; then
+                invoke-rc.d apache2 force-reload || :
+        else
+                [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || :
+        fi
+        ;;
+
+    abort-upgrade|abort-remove|abort-deconfigure)
+        ;;
+
+    *)
+        echo "postinst called with unknown argument \`$1'" >&2
+        exit 1
+        ;;
+esac
+
+#DEBHELPER#
+
+exit 0
+
+
index 8a68717..5cf6515 100755 (executable)
@@ -23,14 +23,6 @@ case "$1" in
         if test ! -d /usr/share/openflow/pki; then
             ofp-pki init
         fi
-
-        # Enable site under Apache.
-        a2ensite openflow-pki >/dev/null
-        if command -v invoke-rc.d >/dev/null 2>&1; then
-                invoke-rc.d apache2 force-reload || :
-        else
-                [ -x /etc/init.d/apache2 ] && /etc/init.d/apache2 force-reload || :
-        fi
         ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
index 238414f..d5f55c0 100755 (executable)
@@ -104,7 +104,7 @@ install-indep: build-indep
        cp _debian/openflow.tar.gz $(MODDIR)
        cd debian; cp changelog control compat *.modules.in rules $(MODDIR)/debian
        cd debian/openflow-datapath-source/usr/src && tar -c modules | bzip2 -9 > openflow-datapath.tar.bz2 && rm -rf modules
-       install -m644 debian/openflow-pki.apache2 debian/openflow-pki/etc/apache2/sites-available/openflow-pki
+       install -m644 debian/openflow-pki-server.apache2 debian/openflow-pki-server/etc/apache2/sites-available/openflow-pki
        dh_install -i
 
 install-arch: build-arch