From 4e47350c590aacfefebc0bd52eefa0ff5c14de4b Mon Sep 17 00:00:00 2001 From: xq2005 Date: Wed, 6 Nov 2013 23:47:48 -0800 Subject: [PATCH] build xcat-openstack on ubuntu --- xCAT-OpenStack/debian/dirs | 10 ++++++++ xCAT-OpenStack/debian/install | 9 +++++++ xCAT-OpenStack/debian/postinst | 44 ++++++++++++++++++++++++++++++++++ 3 files changed, 63 insertions(+) create mode 100644 xCAT-OpenStack/debian/postinst diff --git a/xCAT-OpenStack/debian/dirs b/xCAT-OpenStack/debian/dirs index 3107bc3ef..83afe4d47 100644 --- a/xCAT-OpenStack/debian/dirs +++ b/xCAT-OpenStack/debian/dirs @@ -1 +1,11 @@ opt/xcat/lib/perl/xCAT_schema +opt/xcat/lib/perl/xCAT_plugin +opt/xcat/lib/perl/xCAT +opt/xcat/share/xcat/mypostscript +opt/xcat/share/xcat/templates +opt/xcat/sbin +opt/xcat/share/man/man5 +opt/xcat/share/doc/man5 +opt/xcat/share/man/man7 +opt/xcat/share/doc/man7 +install/postscripts diff --git a/xCAT-OpenStack/debian/install b/xCAT-OpenStack/debian/install index 7e0e2c8db..041771f7a 100644 --- a/xCAT-OpenStack/debian/install +++ b/xCAT-OpenStack/debian/install @@ -1 +1,10 @@ lib/perl/xCAT_schema/* opt/xcat/lib/perl/xCAT_schema/ +lib/perl/xCAT_plugin/* opt/xcat/lib/perl/xCAT_plugin/ +lib/perl/xCAT/* opt/xcat/lib/perl/xCAT/ +sbin/* opt/xcat/sbin/ +share/man/man5/* opt/xcat/share/man/man5/ +share/doc/man5/* opt/xcat/share/doc/man5/ +share/man/man7/* opt/xcat/share/man/man7/ +share/doc/man7/* opt/xcat/share/doc/man7/ +postscripts/* install/postscripts/ +share/xcat/* opt/xcat/share/xcat/ diff --git a/xCAT-OpenStack/debian/postinst b/xCAT-OpenStack/debian/postinst new file mode 100644 index 000000000..3e90d7ca7 --- /dev/null +++ b/xCAT-OpenStack/debian/postinst @@ -0,0 +1,44 @@ +#!/bin/sh +# postinst script for xCAT +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + configure) + if [ -f "/proc/cmdline" ];then + if [ -f "/opt/xcat/sbin/xcatd" ];then + /etc/init.d/xcatd reload + fi + fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0