diff options
author | jvdias <jvdias@fedoraproject.org> | 2005-10-19 19:44:40 +0000 |
---|---|---|
committer | jvdias <jvdias@fedoraproject.org> | 2005-10-19 19:44:40 +0000 |
commit | f4e163996b4fed8dc307b7126576e6fc3ed6ea88 (patch) | |
tree | 8502ee87d9bc1162cc0db1a5572909d462350960 /named.init | |
parent | 94df73dc9059b58eb6c0d2a6fd0e371266f0c57c (diff) | |
download | bind-f4e163996b4fed8dc307b7126576e6fc3ed6ea88.tar.gz bind-f4e163996b4fed8dc307b7126576e6fc3ed6ea88.tar.xz bind-f4e163996b4fed8dc307b7126576e6fc3ed6ea88.zip |
Allow -D option to be used with bind-chroot
Diffstat (limited to 'named.init')
-rwxr-xr-x | named.init | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -30,8 +30,8 @@ prog=$named named_conf=/etc/named.conf c_opt=0 -if [[ "${OPTIONS}" = *-c* ]]; then - named_conf=`echo ${OPTIONS} | sed 's/^.*-c[\ \ ]//;s/[\ \ ].*$//'`; +if echo "$OPTIONS" | egrep -q '(\<|['"'"'"\ \ ])-c'; then + named_conf=`echo ${OPTIONS} | sed 's/^.*[\ \ ]-c[\ \ ]*//;s/[\ \ '"'"'"].*$//'`; c_opt=1; fi; @@ -62,9 +62,17 @@ start() { if [ ! -d ${ROOTDIR}/proc ]; then mkdir -p ${ROOTDIR}/proc fi - if ! egrep -q "${ROOTDIR}/proc proc" /etc/mtab; then - mount -tproc none ${ROOTDIR}/proc >/dev/null 2>&1 + if ! egrep -q "/proc ${ROOTDIR}/proc" /proc/mounts; then + mount --bind /proc ${ROOTDIR}/proc >/dev/null 2>&1 fi + if echo "$OPTIONS" | egrep -q '(\<|['"'"'"\ ])-D(\>|['"'"'"\ ])'; then + if ! /bin/mount | egrep -q "^/var/run/dbus/system_bus_socket on ${ROOTDIR}/var/run/dbus/system_bus_socket"; then + mkdir -p ${ROOTDIR}/var/run/dbus + touch ${ROOTDIR}/var/run/dbus/system_bus_socket; + mount --bind /var/run/dbus/system_bus_socket ${ROOTDIR}/var/run/dbus/system_bus_socket > /dev/null 2>&1; + fi; + fi; + fi no_write_master_zones=0 if [ -e /etc/selinux/config ]; then |