summaryrefslogtreecommitdiffstats
path: root/named.init
diff options
context:
space:
mode:
authorjvdias <jvdias@fedoraproject.org>2005-11-23 21:24:10 +0000
committerjvdias <jvdias@fedoraproject.org>2005-11-23 21:24:10 +0000
commitf84fe396738702d5eb2ef5d8928d0b4178ad7cef (patch)
tree3c4be948eff05cd28d91cc99851a0787a80177fe /named.init
parenta94a77a8bc2ec9b7c582714f051368c1563ed61a (diff)
downloadbind-f84fe396738702d5eb2ef5d8928d0b4178ad7cef.tar.gz
bind-f84fe396738702d5eb2ef5d8928d0b4178ad7cef.tar.xz
bind-f84fe396738702d5eb2ef5d8928d0b4178ad7cef.zip
workaround latest selinux policy: mount /var/run/dbus under chroot insteadbind-9_3_1-24
of /var/run/dbus/system-bus-socket
Diffstat (limited to 'named.init')
-rwxr-xr-xnamed.init10
1 files changed, 6 insertions, 4 deletions
diff --git a/named.init b/named.init
index a5a2a79..95cae9d 100755
--- a/named.init
+++ b/named.init
@@ -64,7 +64,7 @@ start() {
if [ ! -d ${ROOTDIR}/proc ]; then
mkdir -p ${ROOTDIR}/proc
fi
- if ! egrep -q "/proc ${ROOTDIR}/proc" /proc/mounts; then
+ if ! egrep -q '^/proc[[:space:]]+'${ROOTDIR}'/proc' /proc/mounts; then
mount --bind /proc ${ROOTDIR}/proc >/dev/null 2>&1
fi
dbus=0;
@@ -74,10 +74,12 @@ start() {
fi;
done
if [ $dbus -eq 1 ]; then
- if ! /bin/mount | egrep -q "^/var/run/dbus/system_bus_socket on ${ROOTDIR}/var/run/dbus/system_bus_socket"; then
+ if ! egrep '^/[^[:space:]]+[[:space:]]+'${ROOTDIR}'/var/run/dbus' /proc/mounts; 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;
+ if [ ! -d /var/run/dbus ] ; then
+ mkdir -p /var/run/dbus ;
+ fi;
+ mount --bind /var/run/dbus ${ROOTDIR}/var/run/dbus > /dev/null 2>&1;
fi;
fi;
fi