2011-04-29 21:20:55 +00:00
|
|
|
#!/bin/sh
|
2012-05-04 14:45:17 +00:00
|
|
|
# postinst script for xcat-ui
|
2011-04-29 21:20:55 +00:00
|
|
|
#
|
|
|
|
# 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)
|
|
|
|
apachedaemon=apache2
|
2012-05-04 14:45:17 +00:00
|
|
|
/bin/rm -f /etc/apache2/conf.d/xcat-ui.conf
|
|
|
|
/bin/ln -s /opt/xcat/ui/etc/apache2/conf.d/xcat-ui.conf /etc/apache2/conf.d/xcat-ui.conf
|
|
|
|
/etc/init.d/apache2 restart
|
2011-04-29 21:20:55 +00:00
|
|
|
# automatically put the encrypted passwd into the xcat passwd db
|
|
|
|
/opt/xcat/sbin/chtab key=xcat,username=root passwd.password=`grep root /etc/shadow|cut -d : -f 2`
|
|
|
|
|
|
|
|
echo "To use xCAT-UI, point your browser to http://"`hostname -f`"/xcat"
|
|
|
|
;;
|
|
|
|
|
|
|
|
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
|