Comment 6 for bug 933566

Revision history for this message
Thomas Hood (jdthood) wrote : Re: Stopping resolvconf doesn't disable updates

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