[Bug 933566] Re: Stopping resolvconf doesn't disable updates
Thomas Hood
933566 at bugs.launchpad.net
Thu Feb 16 21:43:44 UTC 2012
> until we know why resolvconf is failing to start for you on boot
We know that the resolvconf job starts, otherwise /run/resolvconf
wouldn't exist. The problem is that the job also get stopped.
I added touch commands to the scripts which show this.
--------------------------------------------------
pre-start script
touch /run/resolvconf-started
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
touch /run/resolvconf-stopped
resolvconf --disable-updates
end script
-------------------------------------------------
After boot:
# status resolvconf
resolvconf stop/waiting
# ls -l /run/resolvconf*
-rw-r--r-- 1 root root 0 2012-02-16 22:37 /run/resolvconf-started
-rw-r--r-- 1 root root 0 2012-02-16 22:37 /run/resolvconf-stopped
/run/resolvconf:
total 4
drwxr-xr-x 2 root root 60 2012-02-16 22:38 interface
-rw-r--r-- 1 root root 0 2012-02-16 22:38 postponed-update
-rw-r--r-- 1 root root 151 2012-02-16 22:37 resolv.conf
Interestingly, another job very much like resolvconf doesn't suffer from this problem:
# cat /etc/init/foo.conf
# upstart script for foo
description "Initialize or finalize foo"
start on mounted MOUNTPOINT=/run
stop on runlevel [06]
pre-start script
mkdir -p /run/foo
touch /run/foo/foofile
end script
post-stop script
mv /run/foo/foofile /run/foo/foofile2
end script
# status foo
foo start/running
# ls -l /run/foo
total 0
-rw-r--r-- 1 root root 0 2012-02-16 22:37 foofile
--
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