diff options
Diffstat (limited to 'buildpkg.sh.in')
-rw-r--r-- | buildpkg.sh.in | 34 |
1 files changed, 19 insertions, 15 deletions
diff --git a/buildpkg.sh.in b/buildpkg.sh.in index 8a96b9050..22c66fbd4 100644 --- a/buildpkg.sh.in +++ b/buildpkg.sh.in | |||
@@ -49,6 +49,8 @@ PKG_REQUEST_LOCAL=../pkg-request.local | |||
49 | OPENSSHD=opensshd.init | 49 | OPENSSHD=opensshd.init |
50 | OPENSSH_MANIFEST=openssh.xml | 50 | OPENSSH_MANIFEST=openssh.xml |
51 | OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default | 51 | OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default |
52 | SMF_METHOD_DIR=/lib/svc/method/site | ||
53 | SMF_MANIFEST_DIR=/var/svc/manifest/site | ||
52 | 54 | ||
53 | PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@ | 55 | PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@ |
54 | PATH_USERADD_PROG=@PATH_USERADD_PROG@ | 56 | PATH_USERADD_PROG=@PATH_USERADD_PROG@ |
@@ -196,15 +198,17 @@ then | |||
196 | # For Solaris' SMF, /lib/svc/method/site is the preferred place | 198 | # For Solaris' SMF, /lib/svc/method/site is the preferred place |
197 | # for start/stop scripts that aren't supplied with the OS, and | 199 | # for start/stop scripts that aren't supplied with the OS, and |
198 | # similarly /var/svc/manifest/site for manifests. | 200 | # similarly /var/svc/manifest/site for manifests. |
199 | mkdir -p $FAKE_ROOT${TEST_DIR}/lib/svc/method/site | 201 | mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR} |
200 | mkdir -p $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site | 202 | mkdir -p $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR} |
201 | 203 | ||
202 | cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME} | 204 | cp ${OPENSSHD} $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME} |
203 | chmod 744 $FAKE_ROOT${TEST_DIR}/lib/svc/method/site/${SYSVINIT_NAME} | 205 | chmod 744 $FAKE_ROOT${TEST_DIR}${SMF_METHOD_DIR}/${SYSVINIT_NAME} |
204 | 206 | ||
205 | cat ${OPENSSH_MANIFEST} | sed "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \ | 207 | cat ${OPENSSH_MANIFEST} | \ |
206 | > $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml | 208 | sed -e "s|__SYSVINIT_NAME__|${SYSVINIT_NAME}|" \ |
207 | chmod 644 $FAKE_ROOT${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml | 209 | -e "s|__SMF_METHOD_DIR__|${SMF_METHOD_DIR}|" \ |
210 | > $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml | ||
211 | chmod 644 $FAKE_ROOT${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml | ||
208 | else | 212 | else |
209 | mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d | 213 | mkdir -p $FAKE_ROOT${TEST_DIR}/etc/init.d |
210 | 214 | ||
@@ -214,19 +218,19 @@ fi | |||
214 | 218 | ||
215 | [ "${PERMIT_ROOT_LOGIN}" = no ] && \ | 219 | [ "${PERMIT_ROOT_LOGIN}" = no ] && \ |
216 | perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \ | 220 | perl -p -i -e "s/#PermitRootLogin yes/PermitRootLogin no/" \ |
217 | $FAKE_ROOT/${sysconfdir}/sshd_config | 221 | $FAKE_ROOT${sysconfdir}/sshd_config |
218 | [ "${X11_FORWARDING}" = yes ] && \ | 222 | [ "${X11_FORWARDING}" = yes ] && \ |
219 | perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \ | 223 | perl -p -i -e "s/#X11Forwarding no/X11Forwarding yes/" \ |
220 | $FAKE_ROOT/${sysconfdir}/sshd_config | 224 | $FAKE_ROOT${sysconfdir}/sshd_config |
221 | # fix PrintMotd | 225 | # fix PrintMotd |
222 | perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \ | 226 | perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \ |
223 | $FAKE_ROOT/${sysconfdir}/sshd_config | 227 | $FAKE_ROOT${sysconfdir}/sshd_config |
224 | 228 | ||
225 | # We don't want to overwrite config files on multiple installs | 229 | # We don't want to overwrite config files on multiple installs |
226 | mv $FAKE_ROOT/${sysconfdir}/ssh_config $FAKE_ROOT/${sysconfdir}/ssh_config.default | 230 | mv $FAKE_ROOT${sysconfdir}/ssh_config $FAKE_ROOT${sysconfdir}/ssh_config.default |
227 | mv $FAKE_ROOT/${sysconfdir}/sshd_config $FAKE_ROOT/${sysconfdir}/sshd_config.default | 231 | mv $FAKE_ROOT${sysconfdir}/sshd_config $FAKE_ROOT${sysconfdir}/sshd_config.default |
228 | [ -f $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds ] && \ | 232 | [ -f $FAKE_ROOT${sysconfdir}/ssh_prng_cmds ] && \ |
229 | mv $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds.default | 233 | mv $FAKE_ROOT${sysconfdir}/ssh_prng_cmds $FAKE_ROOT${sysconfdir}/ssh_prng_cmds.default |
230 | 234 | ||
231 | # local tweeks here | 235 | # local tweeks here |
232 | [ -s "${POST_MAKE_INSTALL_FIXES}" ] && . ${POST_MAKE_INSTALL_FIXES} | 236 | [ -s "${POST_MAKE_INSTALL_FIXES}" ] && . ${POST_MAKE_INSTALL_FIXES} |
@@ -336,7 +340,7 @@ then | |||
336 | svccfg delete -f $OPENSSH_FMRI | 340 | svccfg delete -f $OPENSSH_FMRI |
337 | fi | 341 | fi |
338 | # NOTE, The manifest disables sshd by default. | 342 | # NOTE, The manifest disables sshd by default. |
339 | svccfg import ${TEST_DIR}/var/svc/manifest/site/${SYSVINIT_NAME}.xml | 343 | svccfg import ${TEST_DIR}${SMF_MANIFEST_DIR}/${SYSVINIT_NAME}.xml |
340 | else | 344 | else |
341 | if [ "\${USE_SYM_LINKS}" = yes ] | 345 | if [ "\${USE_SYM_LINKS}" = yes ] |
342 | then | 346 | then |