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:
		@@ -12,10 +12,9 @@ depend()
 | 
			
		||||
 | 
			
		||||
start()
 | 
			
		||||
{
 | 
			
		||||
	# /etc/mtab could be a symlink to a location in /proc
 | 
			
		||||
	if readlink -f /etc/mtab | grep -sq '^/proc/\(self\|[0-9]\+\)/mounts$'
 | 
			
		||||
	if [ -l /etc/mtab ]
 | 
			
		||||
	then
 | 
			
		||||
		einfo "Skipping mtab update (link points to location in /proc)"
 | 
			
		||||
		einfo "Skipping mtab update (mtab is a symbolic link)"
 | 
			
		||||
		return 0
 | 
			
		||||
	fi
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user