block 621503 by 620191
thanks

On Thu, Apr 07, 2011 at 04:16:23PM +0200, Thomas Hood wrote:
> Package: resolvconf
> Version: 1.48
> 
> A new filesystem, /run/, is being added for the purpose of holding
> run-time data; unlike /tmp and /var/run it will be available early in the
> boot process.
> 
> Resolvconf should transition from using /lib/init/rw/ to using /run/.
> 
> Resolvconf releases that use /run/ should depend on the soon-to-be-released
> version of initscripts.[0]
> 
> This issue can be addressed simultaneously with #551999/#563386 which also
> require changes to the maintainer scripts.
> 
> [0]http://lists.debian.org/debian-devel/2011/04/msg00353.html

Just attaching the patch I sent you here for the record.


Regards,
Roger
diff -urN resolvconf-1.48.original/debian/changelog resolvconf-1.48/debian/changelog
--- resolvconf-1.48.original/debian/changelog	2011-04-07 14:50:02.492490457 +0100
+++ resolvconf-1.48/debian/changelog	2011-04-07 14:59:36.118145126 +0100
@@ -1,3 +1,17 @@
+resolvconf (1.48run0) UNRELEASED; urgency=low
+
+  [ Roger Leigh ]
+  * README:
+    + Migrate /lib/init/rw to /run
+  * debian/control:
+    + Depend upon initscripts (>= xxx) to guarantee presence of functional
+      /run.
+  * debian/postinst:
+    + Migrate from /lib/init/rw to /run, using the same logic used for the
+      old /dev/shm to /lib/init/rw migration.
+
+ -- Roger Leigh <[email protected]>  Thu, 07 Apr 2011 14:59:33 +0100
+
 resolvconf (1.48) unstable; urgency=low
 
   [ Thomas Hood ]
diff -urN resolvconf-1.48.original/debian/control resolvconf-1.48/debian/control
--- resolvconf-1.48.original/debian/control	2011-04-07 14:50:02.480489644 +0100
+++ resolvconf-1.48/debian/control	2011-04-07 14:56:11.674143552 +0100
@@ -13,7 +13,7 @@
 Package: resolvconf
 Architecture: all
 Enhances: isc-dhcp-client, dhcpcd, pump, udhcpc, ppp, ifupdown, network-manager, bind9, dnsmasq, pdnsd, totd, libc6, nscd
-Depends: lsb-base, ${misc:Depends}
+Depends: lsb-base, initscripts (>= xxx), ${misc:Depends}
 Breaks: dnscache-run
 Description: name server information handler
  Resolvconf is a framework for keeping up to date the system's
diff -urN resolvconf-1.48.original/debian/postinst resolvconf-1.48/debian/postinst
--- resolvconf-1.48.original/debian/postinst	2011-04-07 14:50:02.492490457 +0100
+++ resolvconf-1.48/debian/postinst	2011-04-07 14:53:46.850147379 +0100
@@ -11,10 +11,10 @@
 
 ### Create /etc/resolvconf/run ###
 #
-# Unfortunately we can't keep state files in /var/run/ because 
-# resolvconf, as it must, initializes before networking does and
-# /var/ can be on the network.  In the past we used /dev/shm/
-# but now we use /lib/init/rw/.
+# Unfortunately we can't keep state files in /var/run/ because
+# resolvconf, as it must, initializes before networking does and /var/
+# can be on the network.  In the past we used /dev/shm and
+# /lib/init/rw/, but now we use the newly adopted /run/.
 #
 case "$1" in
   configure|reconfigure)
@@ -25,20 +25,20 @@
 			report_err "Deleting /etc/resolvconf/run symlink whose canonical path could not be determined"
 			rm -f /etc/resolvconf/run
 		elif \
-			[ "$RUN_CANONICALPATH" = "/dev/shm/resolvconf" ] \
-			&& [ -d /lib/init/rw ] \
-			&& [ -w /lib/init/rw ] \
+			[ "$RUN_CANONICALPATH" = "/lib/init/rw/resolvconf" ] \
+			&& [ -d /run ] \
+			&& [ -w /run ] \
 			&& [ -r /proc/mounts ] \
-			&& grep -qs "^tmpfs[[:space:]]\+/lib/init/rw[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
-			&& { [ -d /lib/init/rw/resolvconf ] || mkdir -v /lib/init/rw/resolvconf ; } \
-			&& { [ -d /lib/init/rw/resolvconf/interface ] || mkdir -v /lib/init/rw/resolvconf/interface ; } \
-			&& F="$(echo /dev/shm/resolvconf/*)" \
+			&& grep -qs "^tmpfs[[:space:]]\+/run[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
+			&& { [ -d /run/resolvconf ] || mkdir -v /run/resolvconf ; } \
+			&& { [ -d /run/resolvconf/interface ] || mkdir -v /run/resolvconf/interface ; } \
+			&& F="$(echo /lib/init/rw/resolvconf/*)" \
 			&& [ "$F" ] \
-			&& [ "$F" != '/dev/shm/resolvconf/*' ] \
-			&& cp -a /dev/shm/resolvconf/* /lib/init/rw/resolvconf
+			&& [ "$F" != '/lib/init/rw/resolvconf/*' ] \
+			&& cp -a /lib/init/rw/resolvconf/* /run/resolvconf
 		then
-			report_info "Migrating run-time database from /dev/shm/resolvconf to /lib/init/rw/resolvconf"
-			ln -nsf /lib/init/rw/resolvconf /etc/resolvconf/run
+			report_info "Migrating run-time database from /lib/init/rw/resolvconf to /run/resolvconf"
+			ln -nsf /run/resolvconf /etc/resolvconf/run
 		fi
 	fi
 	# Delete it if it isn't a directory or a link to one
@@ -64,14 +64,14 @@
 		#       put it into a function
 		#
 		if \
-			[ -d /lib/init/rw ] \
-			&& [ -w /lib/init/rw ] \
+			[ -d /run ] \
+			&& [ -w /run ] \
 			&& [ -r /proc/mounts ] \
-			&& grep -qs "^tmpfs[[:space:]]\+/lib/init/rw[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
-			&& { [ -d /lib/init/rw/resolvconf ] || mkdir -v /lib/init/rw/resolvconf ; } \
-			&& { [ -d /lib/init/rw/resolvconf/interface ] || mkdir -v /lib/init/rw/resolvconf/interface ; }
+			&& grep -qs "^tmpfs[[:space:]]\+/run[[:space:]]\+tmpfs[[:space:]]\+\([^[:space:]]\+,\)\?rw" /proc/mounts \
+			&& { [ -d /run/resolvconf ] || mkdir -v /run/resolvconf ; } \
+			&& { [ -d /run/resolvconf/interface ] || mkdir -v /run/resolvconf/interface ; }
 		then
-			ln -s /lib/init/rw/resolvconf /etc/resolvconf/run
+			ln -s /run/resolvconf /etc/resolvconf/run
 		else
 			mkdir -v /etc/resolvconf/run /etc/resolvconf/run/interface
 		fi
diff -urN resolvconf-1.48.original/README resolvconf-1.48/README
--- resolvconf-1.48.original/README	2011-04-07 14:50:02.480489644 +0100
+++ resolvconf-1.48/README	2011-04-07 14:52:30.390265313 +0100
@@ -386,7 +386,7 @@
   + run/
     Directory where run time files are stored.  This can be replaced by
     a symlink to a directory on another filesystem if the admin so
-    desires -- e.g., to /lib/init/rw/resolvconf/ .
+    desires -- e.g., to /run/resolvconf/ .
   + update.d/
     Scripts to run when nameserver information is updated
   + update-libc.d/

Attachment: signature.asc
Description: Digital signature

Reply via email to