File tmpfs.patch of Package bind.import5441

Index: vendor-files/init/lwresd
===================================================================
--- vendor-files/init/lwresd.orig
+++ vendor-files/init/lwresd
@@ -118,6 +118,10 @@ function checkAndCopyConfigFiles
 case "$1" in
     start)
 	echo -n "Starting Lightweight resolver daemon "
+	# Create link if needed, /var/run might be on tmpfs
+	if [ ! -L /var/run/named ] ; then
+	  ln -s ${CHROOT_PREFIX}/var/run/named /var/run/named 
+	fi
 	checkAndCopyConfigFiles
 	startproc ${LWRESD_BIN} ${NAMED_ARGS} -u named
 	rc_status -v
Index: vendor-files/init/named
===================================================================
--- vendor-files/init/named.orig
+++ vendor-files/init/named
@@ -231,6 +231,11 @@ case "$1" in
 	if [ ! -e /etc/named.d/forwarders.conf ]; then
 		touch /etc/named.d/forwarders.conf
 	fi
+        # Create link if needed, /var/run might be on tmpfs
+        if [ ! -L /var/run/named ] ; then
+          ln -s ${CHROOT_PREFIX}/var/run/named /var/run/named
+        fi
+
 	checkproc -p ${NAMED_PID} ${NAMED_BIN}
 	case $? in
 		0) echo -n "- Warning: named already running! " ;;