Your message dated Wed, 25 Apr 2012 14:04:38 -0500
with message-id <20120425190438.GA3570@burratino>
and subject line Re: ifupdown initscripts myreadlink fails to handle nested
symlinks (/run)
has caused the Debian Bug report #625204,
regarding ifupdown initscripts myreadlink fails to handle nested symlinks (/run)
to be marked as done.
This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.
(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)
--
625204: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=625204
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: ifupdown
Version: 0.6.10
Tags: patch
Hi,
if a system is using /run then /dev/shm is a symlink pointing to /run/shm and
ifupdowns initscript will fail to create /etc/network/run
What happens is /etc/network/run is a symlink to /dev/shm/network so the
initscript will try to use its myreadlink() function to find the target.
myreadlink() however will return that the target is /dev/shm/network and so
when the initscript attempts to "mkdir -p /dev/shm/network" it will fail with:
mkdir: cannot create directory `/dev/shm': File exists
This is because /dev/shm is now a symlink to /run/shm and myreadlink() does
not handle dereferencing the nested symlink.
The attached patch makes myreadlink() recognise when it has found a nested
symlink and restart it's main loop again to dereference it resulting in it
calling "mkdir -p /run/shm/network" which will work as expected.
I hope this helps.
Thanks,
Niall
--- End Message ---
--- Begin Message ---
Version: 0.7~rc1+experimental
# doesn't break unrelated software
severity 625204 grave
quit
Hi,
Niall Walsh wrote:
> if a system is using /run then /dev/shm is a symlink pointing to /run/shm and
> ifupdowns initscript will fail to create /etc/network/run
Thanks for reporting it. I suspect this was fixed in 0.7~rc1+experimental:
* Take networking init script over from netbase package.
- Merge ifupdown initscript in.
The code is as follows:
RUN_DIR="/run/network"
IFSTATE="$RUN_DIR/ifstate"
[...]
if [ ! -d "$RUN_DIR" ] ; then
if ! mkdir -p "$RUN_DIR" ; then
log_failure_msg "can't create $RUN_DIR"
exit 1
fi
fi
--- End Message ---