[Bug 933566] Re: Stopping resolvconf doesn't disable updates
Thomas Hood
933566 at bugs.launchpad.net
Fri Feb 17 11:18:23 UTC 2012
I actually upgraded to 1.4-0ubuntu7 yesterday so when I look in
/var/log/upstart/resolvconf.log now I see the results of several
reboots: yes, there they are, repeated instances of:
cp: cannot create regular file `/var/spool/postfix/etc/resolv.conf': Read-only file system^M
run-parts: /etc/resolvconf/update-libc.d/postfix exited with return code 1^M
run-parts: /etc/resolvconf/update.d/libc exited with return code 1^M
I uninstalled postfix and now, after boot,
$ status resolvconf
resolvconf start/running
with this Upstart job definition:
$ cat /etc/init/resolvconf.conf
# upstart script for resolvconf
description "Initialize or finalize resolvconf"
start on mounted MOUNTPOINT=/run
stop on runlevel [06]
pre-start script
mkdir -p /run/resolvconf/interface
# Request a postponed update (needed in case the base file has content).
touch /run/resolvconf/postponed-update
# Enable updates and perform the postponed update.
resolvconf --enable-updates
end script
post-stop script
resolvconf --disable-updates
end script
Furthermore, starting and stopping the resolvconf job does the right
thing.
# status resolvconf
resolvconf start/running
# ls -l /run/resolvconf
total 4
-rw-r--r-- 1 root root 0 2012-02-17 12:17 enable-updates
drwxr-xr-x 2 root root 60 2012-02-17 11:58 interface
-rw-r--r-- 1 root root 177 2012-02-17 11:58 resolv.conf
# stop resolvconf
resolvconf stop/waiting
# ls -l /run/resolvconf
total 4
drwxr-xr-x 2 root root 60 2012-02-17 11:58 interface
-rw-r--r-- 1 root root 177 2012-02-17 11:58 resolv.conf
# start resolvconf
resolvconf start/running
# ls -l /run/resolvconf
total 4
-rw-r--r-- 1 root root 0 2012-02-17 12:17 enable-updates
drwxr-xr-x 2 root root 60 2012-02-17 11:58 interface
-rw-r--r-- 1 root root 177 2012-02-17 11:58 resolv.conf
--
Thomas
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to upstart in Ubuntu.
https://bugs.launchpad.net/bugs/933566
Title:
Stopping resolvconf doesn't disable updates
Status in “resolvconf” package in Ubuntu:
Fix Committed
Status in “upstart” package in Ubuntu:
New
Bug description:
Stopping the resolvconf job should disable updates by means of
deleting the enable-updates flag file, but this does not happen.
# ls -l /run/resolvconf
total 4
-rw-r--r-- 1 root root 0 2012-02-16 17:02 enable-updates
drwxr-xr-x 2 root root 60 2012-02-16 17:02 interface
-rw-r--r-- 1 root root 177 2012-02-16 17:02 resolv.conf
# stop resolvconf
stop: Unknown instance:
# ls -l /run/resolvconf
total 4
-rw-r--r-- 1 root root 0 2012-02-16 17:02 enable-updates
drwxr-xr-x 2 root root 60 2012-02-16 17:02 interface
-rw-r--r-- 1 root root 177 2012-02-16 17:02 resolv.conf
# start resolvconf
resolvconf start/running
# stop resolvconf
resolvconf stop/waiting
# ls -l /run/resolvconf
total 4
-rw-r--r-- 1 root root 0 2012-02-16 17:06 enable-updates
drwxr-xr-x 2 root root 60 2012-02-16 17:02 interface
-rw-r--r-- 1 root root 177 2012-02-16 17:02 resolv.conf
The following change seems to fix this.
--- /etc/init/resolvconf.conf_ORIG 2012-02-16 17:09:22.313489458 +0100
+++ /etc/init/resolvconf.conf 2012-02-16 17:08:31.398957282 +0100
@@ -14,6 +14,6 @@
resolvconf --enable-updates
end script
-pre-stop script
+post-stop script
resolvconf --disable-updates
end script
# stop resolvconf
resolvconf stop/waiting
# ls -l /run/resolvconf
total 4
drwxr-xr-x 2 root root 60 2012-02-16 17:02 interface
-rw-r--r-- 1 root root 177 2012-02-16 17:02 resolv.conf
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/933566/+subscriptions
More information about the foundations-bugs
mailing list