- (tim) [buildpkg.sh.in openssh.xml.in] Clean up Solaris 10 smf(5) bits.

"Looks sane" dtucker@
This commit is contained in:
Tim Rice 2007-03-01 09:34:52 -08:00
parent 1d75f22c5d
commit c3af6d4d13
3 changed files with 14 additions and 11 deletions

View File

@ -6,6 +6,8 @@
block as its interaction with KbdInteractive makes it difficult to block as its interaction with KbdInteractive makes it difficult to
support. Also, relocate the CR/kbdint option special-case code into support. Also, relocate the CR/kbdint option special-case code into
servconf. "please commit" djm@, ok markus@ for the relocation. 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 20070228
- (dtucker) OpenBSD CVS Sync - (dtucker) OpenBSD CVS Sync
@ -2782,4 +2784,4 @@
OpenServer 6 and add osr5bigcrypt support so when someone migrates OpenServer 6 and add osr5bigcrypt support so when someone migrates
passwords between UnixWare and OpenServer they will still work. OK dtucker@ 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 $

View File

@ -48,7 +48,7 @@ PKG_REQUEST_LOCAL=../pkg-request.local
# #
OPENSSHD=opensshd.init OPENSSHD=opensshd.init
OPENSSH_MANIFEST=openssh.xml OPENSSH_MANIFEST=openssh.xml
OPENSSH_FMRI=svc:/site/openssh:default OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default
PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@ PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@
PATH_USERADD_PROG=@PATH_USERADD_PROG@ PATH_USERADD_PROG=@PATH_USERADD_PROG@
@ -202,8 +202,9 @@ then
cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME} cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME}
chmod 744 $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 cat ${OPENSSH_MANIFEST} | sed "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \
chmod 644 $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${OPENSSH_MANIFEST} > $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 else
mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d
@ -334,9 +335,8 @@ then
then then
svccfg delete -f $OPENSSH_FMRI svccfg delete -f $OPENSSH_FMRI
fi fi
# NOTE, if manifest enables sshd by default, this will actually # NOTE, The manifest disables sshd by default.
# start the daemon, which may not be what the user wants. svccfg import ${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
svccfg import ${TEST_DIR}/var/svc/manifest/site/$OPENSSH_MANIFEST
else else
if [ "\${USE_SYM_LINKS}" = yes ] if [ "\${USE_SYM_LINKS}" = yes ]
then then
@ -428,8 +428,6 @@ if [ "\${POST_INS_START}" = "yes" ]
then then
if [ $DO_SMF -eq 1 ] if [ $DO_SMF -eq 1 ]
then then
# See svccfg import note above. The service may already
# be started.
svcadm enable $OPENSSH_FMRI svcadm enable $OPENSSH_FMRI
else else
${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start ${TEST_DIR}/etc/init.d/${SYSVINIT_NAME} start
@ -544,7 +542,7 @@ PRE_INS_STOP=no
POST_INS_START=no POST_INS_START=no
# determine if should restart the daemon # determine if should restart the daemon
if [ -s ${piddir}/sshd.pid ] && \ 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 then
ans=\`ckyorn -d n \ ans=\`ckyorn -d n \
-p "Should the running sshd daemon be restarted? ${DEF_MSG}"\` || exit \$? -p "Should the running sshd daemon be restarted? ${DEF_MSG}"\` || exit \$?

View File

@ -23,6 +23,9 @@
type='service' type='service'
version='1'> version='1'>
<!--
We default to disabled so administrator can decide to enable or not.
-->
<create_default_instance enabled='false'/> <create_default_instance enabled='false'/>
<single_instance/> <single_instance/>
@ -53,7 +56,7 @@
<exec_method <exec_method
name='start' name='start'
type='method' type='method'
exec='/lib/svc/method/site/opensshd start' exec='/lib/svc/method/site/__SYSVINIT_NAME__ start'
timeout_seconds='60'> timeout_seconds='60'>
<method_context/> <method_context/>
</exec_method> </exec_method>