1
0
mirror of https://git.FreeBSD.org/ports.git synced 2024-11-23 00:43:28 +00:00

- Fix chrooted startup [1]

- Reflect new nologin location on recent 5.x

PR:		ports/72713
Reported by:	Hilko Meyer <hilko.meyer@gmx.de> [1]
Submitted by:	Cyrille Lefevre <cyrille.lefevre@laposte.net> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-10-17 12:54:35 +00:00
parent 335b7e4c69
commit a3252db60d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=119653
8 changed files with 36 additions and 16 deletions

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -161,6 +161,11 @@ PLIST_SUB+= LDAP="@comment "
.endif
REINPLACE_SUB= PREFIX=${PREFIX}
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.if ${OSVERSION} >= 502100
RCSCRIPTS_SUB+= NOLOGIN=/usr/sbin/nologin
.else
RCSCRIPTS_SUB+= NOLOGIN=/sbin/nologin
.endif
.if !defined(WITHOUT_DHCP_PARANOIA)
RCSCRIPTS_SUB+= PARANOIA=YES
.else

View File

@ -268,7 +268,7 @@ safe_useradd ()
local _user _group _home _shell _gecos
_user=$1 _group=$2 _gecos=${3:-"& daemon"}
_home=${4:-/nonexistent} _shell=${5:-/sbin/nologin}
_home=${4:-/nonexistent} _shell=${5:-%%NOLOGIN%%}
if [ -n "${_group}" ]; then
if pw group show ${_group} 2>/dev/null; then
@ -443,7 +443,7 @@ setup_chroot ()
{
if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then
safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_devdir}/_ ${_dhcpd_confdir}
safe_rmdir ${_dhcpd_devdir}/_ # /_, so, .../dev is root owned.
# XXX /_ hack! so, .../dev is root owned.
if checkyesno dhcpd_devfs_enable; then
safe_mount ${_dhcpd_devdir}
else
@ -540,7 +540,7 @@ remove_chroot ()
safe_remove ${_dhcpd_conffile}
if checkyesno dhcpd_devfs_enable; then
safe_umount ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack!
else
safe_remove ${_dhcpd_devdir}
fi

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -161,6 +161,11 @@ PLIST_SUB+= LDAP="@comment "
.endif
REINPLACE_SUB= PREFIX=${PREFIX}
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.if ${OSVERSION} >= 502100
RCSCRIPTS_SUB+= NOLOGIN=/usr/sbin/nologin
.else
RCSCRIPTS_SUB+= NOLOGIN=/sbin/nologin
.endif
.if !defined(WITHOUT_DHCP_PARANOIA)
RCSCRIPTS_SUB+= PARANOIA=YES
.else

View File

@ -268,7 +268,7 @@ safe_useradd ()
local _user _group _home _shell _gecos
_user=$1 _group=$2 _gecos=${3:-"& daemon"}
_home=${4:-/nonexistent} _shell=${5:-/sbin/nologin}
_home=${4:-/nonexistent} _shell=${5:-%%NOLOGIN%%}
if [ -n "${_group}" ]; then
if pw group show ${_group} 2>/dev/null; then
@ -443,7 +443,7 @@ setup_chroot ()
{
if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then
safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_devdir}/_ ${_dhcpd_confdir}
safe_rmdir ${_dhcpd_devdir}/_ # /_, so, .../dev is root owned.
# XXX /_ hack! so, .../dev is root owned.
if checkyesno dhcpd_devfs_enable; then
safe_mount ${_dhcpd_devdir}
else
@ -540,7 +540,7 @@ remove_chroot ()
safe_remove ${_dhcpd_conffile}
if checkyesno dhcpd_devfs_enable; then
safe_umount ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack!
else
safe_remove ${_dhcpd_devdir}
fi

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -161,6 +161,11 @@ PLIST_SUB+= LDAP="@comment "
.endif
REINPLACE_SUB= PREFIX=${PREFIX}
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.if ${OSVERSION} >= 502100
RCSCRIPTS_SUB+= NOLOGIN=/usr/sbin/nologin
.else
RCSCRIPTS_SUB+= NOLOGIN=/sbin/nologin
.endif
.if !defined(WITHOUT_DHCP_PARANOIA)
RCSCRIPTS_SUB+= PARANOIA=YES
.else

View File

@ -268,7 +268,7 @@ safe_useradd ()
local _user _group _home _shell _gecos
_user=$1 _group=$2 _gecos=${3:-"& daemon"}
_home=${4:-/nonexistent} _shell=${5:-/sbin/nologin}
_home=${4:-/nonexistent} _shell=${5:-%%NOLOGIN%%}
if [ -n "${_group}" ]; then
if pw group show ${_group} 2>/dev/null; then
@ -443,7 +443,7 @@ setup_chroot ()
{
if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then
safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_devdir}/_ ${_dhcpd_confdir}
safe_rmdir ${_dhcpd_devdir}/_ # /_, so, .../dev is root owned.
# XXX /_ hack! so, .../dev is root owned.
if checkyesno dhcpd_devfs_enable; then
safe_mount ${_dhcpd_devdir}
else
@ -540,7 +540,7 @@ remove_chroot ()
safe_remove ${_dhcpd_conffile}
if checkyesno dhcpd_devfs_enable; then
safe_umount ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack!
else
safe_remove ${_dhcpd_devdir}
fi

View File

@ -8,7 +8,7 @@
PORTNAME= dhcp
PORTVERSION= 3.0.1.r14
PORTREVISION= 5
PORTREVISION= 6
CATEGORIES= net
MASTER_SITES= ${MASTER_SITE_ISC}
MASTER_SITE_SUBDIR= dhcp dhcp/dhcp-3.0-history
@ -161,6 +161,11 @@ PLIST_SUB+= LDAP="@comment "
.endif
REINPLACE_SUB= PREFIX=${PREFIX}
RCSCRIPTS_SUB= PREFIX=${PREFIX} RC_SUBR=${RC_SUBR}
.if ${OSVERSION} >= 502100
RCSCRIPTS_SUB+= NOLOGIN=/usr/sbin/nologin
.else
RCSCRIPTS_SUB+= NOLOGIN=/sbin/nologin
.endif
.if !defined(WITHOUT_DHCP_PARANOIA)
RCSCRIPTS_SUB+= PARANOIA=YES
.else

View File

@ -268,7 +268,7 @@ safe_useradd ()
local _user _group _home _shell _gecos
_user=$1 _group=$2 _gecos=${3:-"& daemon"}
_home=${4:-/nonexistent} _shell=${5:-/sbin/nologin}
_home=${4:-/nonexistent} _shell=${5:-%%NOLOGIN%%}
if [ -n "${_group}" ]; then
if pw group show ${_group} 2>/dev/null; then
@ -443,7 +443,7 @@ setup_chroot ()
{
if checkyesno paranoia && checkyesno dhcpd_chroot_enable; then
safe_mkdir ${_dhcpd_rootdir} ${_dhcpd_devdir}/_ ${_dhcpd_confdir}
safe_rmdir ${_dhcpd_devdir}/_ # /_, so, .../dev is root owned.
# XXX /_ hack! so, .../dev is root owned.
if checkyesno dhcpd_devfs_enable; then
safe_mount ${_dhcpd_devdir}
else
@ -540,7 +540,7 @@ remove_chroot ()
safe_remove ${_dhcpd_conffile}
if checkyesno dhcpd_devfs_enable; then
safe_umount ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}
safe_rmdir ${_dhcpd_devdir}/_ # XXX /_ hack!
else
safe_remove ${_dhcpd_devdir}
fi