patch for openssh/contrib/solaris/buildpkg.sh

kevin brintnall kbrint at rufus.net
Sat May 25 07:31:51 EST 2002


Here is a small patch for OpenSSH 3.2.3p1..

When the package postinstall script runs, it presumes that the package
will be installed relative to the current / directory..  If this package
is installed as part of a Solaris Jumpstart installation, this will not be
the case.  Consequentially, the /etc/ssh/sshd_config.default will never
get copied to /etc/ssh/sshd_config on the new operating system.

The Solaris package installer defines the environment variable
PKG_INSTALL_ROOT to point to the root directory of the installed package.
The attached patch makes the postinstall script aware of this.  It should
now function as designed in a Jumpstart environment also (or any other
environment where the PKG_INSTALL_ROOT != /)

Cheers!

-- 
 kevin brintnall =~ <kbrint at rufus.net>
-------------- next part --------------
174,180c174,180
< [ -f ${sysconfdir}/ssh_config ]  ||  \\
< 	cp -p ${sysconfdir}/ssh_config.default ${sysconfdir}/ssh_config
< [ -f ${sysconfdir}/sshd_config ]  ||  \\
< 	cp -p ${sysconfdir}/sshd_config.default ${sysconfdir}/sshd_config
< [ -f ${sysconfdir}/ssh_prng_cmds.default ]  &&  {
< 	[ -f ${sysconfdir}/ssh_prng_cmds ]  ||  \\
< 	cp -p ${sysconfdir}/ssh_prng_cmds.default ${sysconfdir}/ssh_prng_cmds
---
> [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config ]  ||  \\
> 	cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config.default \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_config
> [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config ]  ||  \\
> 	cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config.default \${PKG_INSTALL_ROOT}${sysconfdir}/sshd_config
> [ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default ]  &&  {
> 	[ -f \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds ]  ||  \\
> 	cp -p \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds.default \${PKG_INSTALL_ROOT}${sysconfdir}/ssh_prng_cmds
194,197c194,197
< installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
< 	installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
< 	installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
< 	installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
---
> installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=../init.d/${SYSVINIT_NAME} s
200,203c200,203
< installf ${PKGNAME} $TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
< 	installf ${PKGNAME} $TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
< 	installf ${PKGNAME} $TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
< 	installf ${PKGNAME} $TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
---
> installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rcS.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc0.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc1.d/K30${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
> 	installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR/etc/rc2.d/S98${SYSVINIT_NAME}=$TEST_DIR/etc/init.d/${SYSVINIT_NAME} l
207c207
< [ -d $piddir ]  ||  installf ${PKGNAME} $TEST_DIR$piddir d 755 root sys
---
> [ -d $piddir ]  ||  installf ${PKGNAME} \${PKG_INSTALL_ROOT}$TEST_DIR$piddir d 755 root sys


More information about the openssh-unix-dev mailing list