summaryrefslogtreecommitdiff
path: root/pp
diff options
context:
space:
mode:
authorTodd C. Miller <Todd.Miller@courtesan.com>2010-09-17 12:14:12 -0400
committerTodd C. Miller <Todd.Miller@courtesan.com>2010-09-17 12:14:12 -0400
commit1185000cf61a4857c659a51092931c3ad10920ab (patch)
tree87528bf9cfacee8f266972026f28669c6a6194b8 /pp
parentb636f77d257bf74ce39e3500fe5b916a41259ef0 (diff)
downloadsudo-1185000cf61a4857c659a51092931c3ad10920ab.tar.gz
Sync with git version
Diffstat (limited to 'pp')
-rwxr-xr-xpp85
1 files changed, 66 insertions, 19 deletions
diff --git a/pp b/pp
index 3f1b27fdd..22c050b61 100755
--- a/pp
+++ b/pp
@@ -1,6 +1,6 @@
#!/bin/sh
# (c) 2010 Quest Software, Inc. All rights reserved
-pp_revision="281"
+pp_revision="20100917"
# Copyright 2010 Quest Software, Inc. All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
@@ -1729,8 +1729,8 @@ pp_aix_inventory () {
case "$t" in
f) if test -r "$pp_destdir$p"; then
case "`file "$pp_destdir$p"`" in
- *": executable (RISC System/6000)"*) abi=ppc;;
- *": 64-bit XCOFF executable"*) abi=ppc64;;
+ *"executable (RISC System/6000)"*) abi=ppc;;
+ *"64-bit XCOFF executable"*) abi=ppc64;;
*) abi=;;
esac
if test -n "$abi"; then
@@ -3032,6 +3032,14 @@ pp_backend_solaris () {
pp_solaris_install_service $_svc | pp_prepend $pp_wrkdir/postinstall
pp_prepend $pp_wrkdir/preremove <<-.
/etc/init.d/$_svc stop >/dev/null 2>/dev/null
+ # Remove the service from SMF if present
+ if [ "x${PKG_INSTALL_ROOT}" = 'x' ]; then
+ if [ -x /usr/sbin/svcadm ] ; then
+ # Likely un-needed, but just in case.
+ /usr/sbin/svcadm disable -s $_svc 2>/dev/null
+ /usr/sbin/svccfg delete $_svc 2>/dev/null
+ fi
+ fi
.
done
@@ -3427,6 +3435,43 @@ pp_solaris_make_service () {
echo "#! /sbin/sh" >$out
echo "#-- This service init file generated by polypkg" >>$out
+ #-- Start SMF integration.
+ if [ -n "$pp_svc_xml_file" ] ; then
+ cat <<_EOF >>$out
+if [ -x /usr/sbin/svcadm ] && [ "x\$1" != "xstatus" ] && [ "t\$QUEST_SMF_SERVICE" = "t" ] ; then
+ case "\$1" in
+ start)
+ echo "starting $svc"
+ /usr/sbin/svcadm clear svc:/quest/$svc:default >/dev/null 2>&1
+ /usr/sbin/svcadm enable -s quest/$svc
+ RESULT=\$?
+ if [ "\$RESULT" -ne 0 ] ; then
+ echo "Error \$RESULT starting $svc"
+ fi
+ ;;
+ stop)
+ echo "stopping $svc"
+ /usr/sbin/svcadm disable -ts quest/$svc
+ ;;
+ restart)
+ echo "restarting $svc"
+ /usr/sbin/svcadm disable -ts quest/$svc
+ /usr/sbin/svcadm clear svc:/quest/$svc:default >/dev/null 2>&1
+ /usr/sbin/svcadm enable -s quest/$svc
+ RESULT=\$?
+ if [ "\$RESULT" -ne 0 ] ; then
+ echo "Error \$RESULT starting $svc"
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/$svc {start|stop|restart|status}"
+ exit 1
+ esac
+ exit 0
+fi
+_EOF
+ fi
+
#-- construct a start command that builds a pid file as needed
# and forks the daemon
_cmd="$cmd";
@@ -3534,7 +3579,6 @@ pp_solaris_install_service () {
s="${solaris_sysv_init_start}$1"
k="${solaris_sysv_init_kill}$1"
- echo 'case " $SERVICES " in *" '$1' "*)'
echo '
if [ "x${PKG_INSTALL_ROOT}" != "x" ]; then
if [ -x ${PKG_INSTALL_ROOT}/usr/sbin/svcadm ]; then
@@ -3577,8 +3621,9 @@ else
echo "installf -c run \$PKGINST \$PKG_INSTALL_ROOT$l=../init.d/$1 s"
pp_solaris_space /etc/rc$state.d 0 1
done
- echo " :;; esac"
-
+ echo '
+ fi
+fi'
}
pp_platforms="$pp_platforms deb"
@@ -4022,37 +4067,37 @@ pp_backend_deb_probe() {
release=`lsb_release -cs`
case $release in
buzz)
- release="1.1"
+ release="11"
;;
rex)
- release="1.2"
+ release="12"
;;
bo)
- release="1.3"
+ release="13"
;;
hamm)
- release="2.0"
+ release="20"
;;
slink)
- release="2.1"
+ release="21"
;;
potato)
- release="2.2"
+ release="22"
;;
woody)
- release="3.0"
+ release="30"
;;
sarge)
- release="3.1"
+ release="31"
;;
etch)
- release="4.0"
+ release="40"
;;
lenny)
- release="5.0"
+ release="50"
;;
squeeze)
- release="6.0"
+ release="60"
;;
esac
;;
@@ -5218,9 +5263,9 @@ pp_rpm_writefiles () {
farch=s390;;
*": ELF 64-bit MSB "*", IBM S/390"*)
farch=s390x;;
- *": executable (RISC System/6000)"*)
+ *"executable (RISC System/6000)"*)
farch=ppc;;
- *": 64-bit XCOFF executable"*)
+ *"64-bit XCOFF executable"*)
fatch=ppc64;;
*)
farch=noarch;;
@@ -6621,6 +6666,8 @@ CompressedSize 0
)
rm -rf $pp_wrkdir/bom_stage
+
+ hdiutil create -fs HFS+ -srcfolder $pkgdir -volname $name ${name}-${version}.dmg
}
pp_backend_macos_cleanup () {