Do not update mtab if it is a symbolic link
Reported-by: <junkmailnotread@yahoo.com> X-Gentoo-Bug: 370037 X-Gentoo-Bug-URL: http://bugs.gentoo.org/show_bug.cgi?id=370037
This commit is contained in:
parent
0c8bea2152
commit
2330978300
@ -12,10 +12,9 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
# /etc/mtab could be a symlink to a location in /proc
|
if [ -l /etc/mtab ]
|
||||||
if readlink -f /etc/mtab | grep -sq '^/proc/\(self\|[0-9]\+\)/mounts$'
|
|
||||||
then
|
then
|
||||||
einfo "Skipping mtab update (link points to location in /proc)"
|
einfo "Skipping mtab update (mtab is a symbolic link)"
|
||||||
return 0
|
return 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user