summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Rice <tim@multitalents.net>2007-03-01 09:34:52 -0800
committerTim Rice <tim@multitalents.net>2007-03-01 09:34:52 -0800
commitc3af6d4d130a35120713d937e7d5efc933e86c3a (patch)
tree27f23392800149575e8bfc55cfa9e7905074926d
parent1d75f22c5d99ce1a4c7a87c7ae042a33fbeefefb (diff)
- (tim) [buildpkg.sh.in openssh.xml.in] Clean up Solaris 10 smf(5) bits.
"Looks sane" dtucker@
-rw-r--r--ChangeLog4
-rw-r--r--buildpkg.sh.in16
-rw-r--r--openssh.xml.in5
3 files changed, 14 insertions, 11 deletions
diff --git a/ChangeLog b/ChangeLog
index feee3ff9..6377c49a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -6,6 +6,8 @@
block as its interaction with KbdInteractive makes it difficult to
support. Also, relocate the CR/kbdint option special-case code into
servconf. "please commit" djm@, ok markus@ for the relocation.
+ - (tim) [buildpkg.sh.in openssh.xml.in] Clean up Solaris 10 smf(5) bits.
+ "Looks sane" dtucker@
20070228
- (dtucker) OpenBSD CVS Sync
@@ -2782,4 +2784,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@
-$Id: ChangeLog,v 1.4625 2007/03/01 10:31:28 dtucker Exp $
+$Id: ChangeLog,v 1.4626 2007/03/01 17:34:52 tim Exp $
diff --git a/buildpkg.sh.in b/buildpkg.sh.in
index 17349f7f..8a96b905 100644
--- a/buildpkg.sh.in
+++ b/buildpkg.sh.in
@@ -48,7 +48,7 @@ PKG_REQUEST_LOCAL=../pkg-request.local
#
OPENSSHD=opensshd.init
OPENSSH_MANIFEST=openssh.xml
-OPENSSH_FMRI=svc:/site/openssh:default
+OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default
PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@
PATH_USERADD_PROG=@PATH_USERADD_PROG@
@@ -202,8 +202,9 @@ then
cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME}
chmod 744 $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME}
- cp ${OPENSSH_MANIFEST} $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site
- chmod 644 $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${OPENSSH_MANIFEST}
+ cat ${OPENSSH_MANIFEST} | sed "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \
+ > $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
+ chmod 644 $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
else
mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d
@@ -334,9 +335,8 @@ then
then
svccfg delete -f $OPENSSH_FMRI
fi
- # NOTE, if manifest enables sshd by default, this will actually
- # start the daemon, which may not be what the user wants.
- svccfg import ${TEST_DIR}/var/svc/manifest/site/$OPENSSH_MANIFEST
+ # NOTE, The manifest disables sshd by default.
+ svccfg import ${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
else
if [ "\${USE_SYM_LINKS}" = yes ]
then
@@ -428,8 +428,6 @@ if [ "\${POST_INS_START}" = "yes" ]
then
if [ $DO_SMF -eq 1 ]
then
- # See svccfg import note above. The service may already
- # be started.
svcadm enable $OPENSSH_FMRI
else
${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start
@@ -544,7 +542,7 @@ PRE_INS_STOP=no
POST_INS_START=no
# determine if should restart the daemon
if [ -s ${piddir}/sshd.pid ] && \
- /usr/bin/svcs $OPENSSH_FMRI 2>&1 | egrep "^online" > /dev/null 2>&1
+ /usr/bin/svcs -H $OPENSSH_FMRI 2>&1 | egrep "^online" > /dev/null 2>&1
then
ans=\`ckyorn -d n \
-p "Should the running sshd daemon be restarted? ${DEF_MSG}"\` || exit \$?
diff --git a/openssh.xml.in b/openssh.xml.in
index 655ee5c9..2fcdea0a 100644
--- a/openssh.xml.in
+++ b/openssh.xml.in
@@ -23,6 +23,9 @@
type='service'
version='1'>
+<!--
+ We default to disabled so administrator can decide to enable or not.
+-->
<create_default_instance enabled='false'/>
<single_instance/>
@@ -53,7 +56,7 @@
<exec_method
name='start'
type='method'
- exec='/lib/svc/method/site/opensshd start'
+ exec='/lib/svc/method/site/__SYSVINIT_NAME__ start'
timeout_seconds='60'>
<method_context/>
</exec_method>