diff --git a/net-misc/openssh/files/sshd.confd b/net-misc/openssh/files/sshd.confd index 28952b4a285..0a7a808233e 100644 --- a/net-misc/openssh/files/sshd.confd +++ b/net-misc/openssh/files/sshd.confd @@ -2,7 +2,7 @@ # Where is your sshd_config file stored? -SSHD_CONFDIR="/etc/ssh" +SSHD_CONFDIR="${RC_PREFIX}/etc/ssh" # Any random options you want to pass to sshd. @@ -13,9 +13,9 @@ SSHD_OPTS="" # Pid file to use (needs to be absolute path). -#SSHD_PIDFILE="/var/run/sshd.pid" +#SSHD_PIDFILE="${RC_PREFIX}/var/run/sshd.pid" # Path to the sshd binary (needs to be absolute path). -#SSHD_BINARY="/usr/sbin/sshd" +#SSHD_BINARY="${RC_PREFIX}/usr/sbin/sshd" diff --git a/net-misc/openssh/files/sshd.rc6.4 b/net-misc/openssh/files/sshd.rc6.4 index 5e301420361..d9a45b9ceac 100644 --- a/net-misc/openssh/files/sshd.rc6.4 +++ b/net-misc/openssh/files/sshd.rc6.4 @@ -5,10 +5,10 @@ extra_commands="checkconfig" extra_started_commands="reload" -: ${SSHD_CONFDIR:=/etc/ssh} +: ${SSHD_CONFDIR:=${RC_PREFIX}/etc/ssh} : ${SSHD_CONFIG:=${SSHD_CONFDIR}/sshd_config} -: ${SSHD_PIDFILE:=/var/run/${SVCNAME}.pid} -: ${SSHD_BINARY:=/usr/sbin/sshd} +: ${SSHD_PIDFILE:=${RC_PREFIX}/var/run/${SVCNAME}.pid} +: ${SSHD_BINARY:=${RC_PREFIX}/usr/sbin/sshd} depend() { use logger dns @@ -26,7 +26,7 @@ depend() { if [ -n "${warn_addr}" ] ; then need net ewarn "You are binding an interface in ListenAddress statement in your sshd_config!" - ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/sshd" + ewarn "You must add rc_need=\"net.FOO\" to your ${RC_PREFIX}/etc/conf.d/sshd" ewarn "where FOO is the interface(s) providing the following address(es):" ewarn "${warn_addr}" fi @@ -34,21 +34,21 @@ depend() { } checkconfig() { - if [ ! -d /var/empty ] ; then - mkdir -p /var/empty || return 1 + if [ ! -d ${RC_PREFIX}/var/empty ] ; then + mkdir -p ${RC_PREFIX}/var/empty || return 1 fi if [ ! -e "${SSHD_CONFIG}" ] ; then eerror "You need an ${SSHD_CONFIG} file to run sshd" - eerror "There is a sample file in /usr/share/doc/openssh" + eerror "There is a sample file in ${RC_PREFIX}/usr/share/doc/openssh" return 1 fi ssh-keygen -A || return 1 - [ "${SSHD_PIDFILE}" != "/var/run/sshd.pid" ] \ + [ "${SSHD_PIDFILE}" != "${RC_PREFIX}/var/run/sshd.pid" ] \ && SSHD_OPTS="${SSHD_OPTS} -o PidFile=${SSHD_PIDFILE}" - [ "${SSHD_CONFIG}" != "/etc/ssh/sshd_config" ] \ + [ "${SSHD_CONFIG}" != "${RC_PREFIX}/etc/ssh/sshd_config" ] \ && SSHD_OPTS="${SSHD_OPTS} -f ${SSHD_CONFIG}" "${SSHD_BINARY}" -t ${SSHD_OPTS} || return 1