Implement resolvconf solution in /etc/grml/fai/grml/grml_cleanup_chroot
authorMichael Prokop <devnull@localhost>
Mon, 17 Sep 2007 20:14:52 +0000 (22:14 +0200)
committerMichael Prokop <devnull@localhost>
Mon, 17 Sep 2007 20:14:52 +0000 (22:14 +0200)
etc/grml/fai/grml/grml_cleanup_chroot

index 9b1cb2a..71ad9ea 100755 (executable)
@@ -4,7 +4,7 @@
 # Authors:       (c) Michael Prokop <mika@grml.org>
 # Bug-Reports:   see http://grml.org/bugs/
 # License:       This file is licensed under the GPL v2.
-# Latest change: Mon Sep 17 16:57:17 CEST 2007 [mika]
+# Latest change: Mon Sep 17 22:14:33 CEST 2007 [mika]
 ################################################################################
 
 # misc stuff
@@ -358,6 +358,20 @@ if ! [ -r /etc/ld.so.nohwcap ] ; then
    touch /etc/ld.so.nohwcap
 fi
 
+# installation of resolvconf in chroot *with* /proc
+# is different from an installation without /proc,
+# so make sure it is OK in any case; don't use /dev/shm
+if [ -d /etc/resolvconf ] ; then
+   rm -rf /etc/resolvconf/run
+   mkdir /etc/resolvconf/run
+   touch /etc/resolvconf/run/enable-updates
+   mkdir /etc/resolvconf/run/interfaces
+   cat > /etc/resolvconf/run/resolv.conf << EOF
+# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
+#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
+EOF
+fi
+
 if [ -x /usr/bin/updatedb ] ; then
   einfo "Updating locate-database"
   mount -t proc none /proc