diff options
Diffstat (limited to 'contrib/solaris')
-rwxr-xr-x | contrib/solaris/buildpkg.sh | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/contrib/solaris/buildpkg.sh b/contrib/solaris/buildpkg.sh index 1be6ed8d1..426db1f6a 100755 --- a/contrib/solaris/buildpkg.sh +++ b/contrib/solaris/buildpkg.sh | |||
@@ -11,7 +11,9 @@ umask 022 | |||
11 | # Options for building the package | 11 | # Options for building the package |
12 | # You can create a config.local with your customized options | 12 | # You can create a config.local with your customized options |
13 | # | 13 | # |
14 | # uncommenting TEST_DIR and using configure--prefix=/var/tmp and | 14 | # uncommenting TEST_DIR and using |
15 | # configure --prefix=/var/tmp --with-privsep-path=/var/tmp/empty | ||
16 | # and | ||
15 | # PKGNAME=tOpenSSH should allow testing a package without interfering | 17 | # PKGNAME=tOpenSSH should allow testing a package without interfering |
16 | # with a real OpenSSH package on a system. | 18 | # with a real OpenSSH package on a system. |
17 | #TEST_DIR=/var/tmp # leave commented out for production build | 19 | #TEST_DIR=/var/tmp # leave commented out for production build |
@@ -106,7 +108,8 @@ case ${UNAME_S} in | |||
106 | RCS_D=yes | 108 | RCS_D=yes |
107 | DEF_MSG="(default: n)" | 109 | DEF_MSG="(default: n)" |
108 | ;; | 110 | ;; |
109 | *) ARCH=`uname -m` ;; | 111 | *) ARCH=`uname -m` |
112 | DEF_MSG="\n" ;; | ||
110 | esac | 113 | esac |
111 | 114 | ||
112 | ## Setup our run level stuff while we are at it. | 115 | ## Setup our run level stuff while we are at it. |
@@ -171,13 +174,16 @@ echo "Building postinstall file..." | |||
171 | cat > postinstall << _EOF | 174 | cat > postinstall << _EOF |
172 | #! /sbin/sh | 175 | #! /sbin/sh |
173 | # | 176 | # |
174 | [ -f ${sysconfdir}/ssh_config ] || \\ | 177 | [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config ] || \\ |
175 | cp -p ${sysconfdir}/ssh_config.default ${sysconfdir}/ssh_config | 178 | cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config.default \\ |
176 | [ -f ${sysconfdir}/sshd_config ] || \\ | 179 | \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config |
177 | cp -p ${sysconfdir}/sshd_config.default ${sysconfdir}/sshd_config | 180 | [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config ] || \\ |
178 | [ -f ${sysconfdir}/ssh_prng_cmds.default ] && { | 181 | cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config.default \\ |
179 | [ -f ${sysconfdir}/ssh_prng_cmds ] || \\ | 182 | \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config |
180 | cp -p ${sysconfdir}/ssh_prng_cmds.default ${sysconfdir}/ssh_prng_cmds | 183 | [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default ] && { |
184 | [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds ] || \\ | ||
185 | cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default \\ | ||
186 | \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds | ||
181 | } | 187 | } |
182 | 188 | ||
183 | # make rc?.d dirs only if we are doing a test install | 189 | # make rc?.d dirs only if we are doing a test install |
@@ -191,20 +197,20 @@ cat > postinstall << _EOF | |||
191 | if [ "\${USE_SYM_LINKS}" = yes ] | 197 | if [ "\${USE_SYM_LINKS}" = yes ] |
192 | then | 198 | then |
193 | [ "$RCS_D" = yes ] && \ | 199 | [ "$RCS_D" = yes ] && \ |
194 | installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s | 200 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s |
195 | installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s | 201 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s |
196 | installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s | 202 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s |
197 | installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s | 203 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s |
198 | else | 204 | else |
199 | [ "$RCS_D" = yes ] && \ | 205 | [ "$RCS_D" = yes ] && \ |
200 | installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l | 206 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l |
201 | installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l | 207 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l |
202 | installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l | 208 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l |
203 | installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l | 209 | installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l |
204 | fi | 210 | fi |
205 | 211 | ||
206 | # If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh) | 212 | # If piddir doesn't exist we add it. (Ie. --with-pid-dir=/var/opt/ssh) |
207 | [ -d $piddir ] || installf ${PKGNAME} $TEST_DIR$piddir d 755 root sys | 213 | [ -d $piddir ] || installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR$piddir d 755 root sys |
208 | 214 | ||
209 | installf -f ${PKGNAME} | 215 | installf -f ${PKGNAME} |
210 | 216 | ||