- (tim) [buildpkg.sh.in openssh.xml.in] Allow more flexibility where smf(5)

files are installed.
This commit is contained in:
Tim Rice 2007-07-24 21:16:07 -07:00
parent bf0212d1b7
commit ffe3a8ec7e
3 changed files with 16 additions and 10 deletions

View File

@ -2,6 +2,8 @@
- (tim) [openssh.xml.in] make FMRI match what package scripts use.
- (tim) [openbsd-compat/regress/closefromtest.c] Bug 1345: fix open() call.
Report/patch by David.Leonard AT quest.com
- (tim) [buildpkg.sh.in openssh.xml.in] Allow more flexibility where smf(5)
files are installed.
20070628
- (djm) bz#1325: Fix SELinux in permissive mode where it would
@ -3114,4 +3116,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.4713 2007/07/25 03:54:09 tim Exp $
$Id: ChangeLog,v 1.4714 2007/07/25 04:16:07 tim Exp $

View File

@ -49,6 +49,8 @@ PKG_REQUEST_LOCAL=../pkg-request.local
OPENSSHD=opensshd.init
OPENSSH_MANIFEST=openssh.xml
OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default
SMF_METHOD_DIR=/lib/svc/method/site
SMF_MANIFEST_DIR=/var/svc/manifest/site
PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@
PATH_USERADD_PROG=@PATH_USERADD_PROG@
@ -196,15 +198,17 @@ then
# For Solaris' SMF, /lib/svc/method/site is the preferred place
# for start/stop scripts that aren't supplied with the OS, and
# similarly /var/svc/manifest/site for manifests.
mkdir -p $FAKE_ROOT${TEST_DIR}/lib/svc/method/site
mkdir -p $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site
mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}
mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}
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 ${OPENSSHD} $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME}
chmod 744 $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME}
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
cat ${OPENSSH_MANIFEST} | \
sed -e "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \
-e "s|__SMF_METHOD_DIR__|${SMF_METHOD_DIR}|" \
> $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml
chmod 644 $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml
else
mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d
@ -336,7 +340,7 @@ then
svccfg delete -f $OPENSSH_FMRI
fi
# NOTE, The manifest disables sshd by default.
svccfg import ${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml
svccfg import ${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml
else
if [ "\${USE_SYM_LINKS}" = yes ]
then

View File

@ -56,7 +56,7 @@
<exec_method
name='start'
type='method'
exec='/lib/svc/method/site/__SYSVINIT_NAME__ start'
exec='__SMF_METHOD_DIR__/__SYSVINIT_NAME__ start'
timeout_seconds='60'>
<method_context/>
</exec_method>