summaryrefslogtreecommitdiff
path: root/buildpkg.sh.in
diff options
context:
space:
mode:
authorColin Watson <cjwatson@debian.org>2009-12-29 21:40:29 +0000
committerColin Watson <cjwatson@debian.org>2009-12-29 21:40:29 +0000
commita25ec0b132c44c9e341e08464ff830de06b81126 (patch)
treee20842d80f9e25cb6cf09525abea63f7bf655dd7 /buildpkg.sh.in
parent1b816ea846aca3ee89e7995373ace609e9518424 (diff)
parent70847d299887abb96f8703ca99db6d817b78960e (diff)
import openssh-4.7p1-gsskex-20070927.patch
Diffstat (limited to 'buildpkg.sh.in')
-rw-r--r--buildpkg.sh.in34
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
49OPENSSHD=opensshd.init 49OPENSSHD=opensshd.init
50OPENSSH_MANIFEST=openssh.xml 50OPENSSH_MANIFEST=openssh.xml
51OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default 51OPENSSH_FMRI=svc:/site/${SYSVINIT_NAME}:default
52SMF_METHOD_DIR=/lib/svc/method/site
53SMF_MANIFEST_DIR=/var/svc/manifest/site
52 54
53PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@ 55PATH_GROUPADD_PROG=@PATH_GROUPADD_PROG@
54PATH_USERADD_PROG=@PATH_USERADD_PROG@ 56PATH_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
208else 212else
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
222perl -p -i -e "s/#PrintMotd yes/PrintMotd no/" \ 226perl -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
226mv $FAKE_ROOT/${sysconfdir}/ssh_config $FAKE_ROOT/${sysconfdir}/ssh_config.default 230mv $FAKE_ROOT${sysconfdir}/ssh_config $FAKE_ROOT${sysconfdir}/ssh_config.default
227mv $FAKE_ROOT/${sysconfdir}/sshd_config $FAKE_ROOT/${sysconfdir}/sshd_config.default 231mv $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 ] && \
229mv $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds $FAKE_ROOT/${sysconfdir}/ssh_prng_cmds.default 233mv $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
340else 344else
341 if [ "\${USE_SYM_LINKS}" = yes ] 345 if [ "\${USE_SYM_LINKS}" = yes ]
342 then 346 then