sysfs: restorecon after mounting /sys
X-Gentoo-Bug: 516956 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=516956
This commit is contained in:
parent
89907b60ba
commit
99939b9839
@ -120,6 +120,18 @@ mount_cgroups()
|
|||||||
done < /proc/cgroups
|
done < /proc/cgroups
|
||||||
}
|
}
|
||||||
|
|
||||||
|
restorecon_sys()
|
||||||
|
{
|
||||||
|
if [ -x /sbin/restorecon ]; then
|
||||||
|
ebegin "Restoring SELinux contexts in /sys"
|
||||||
|
restorecon -F /sys/devices/system/cpu/online >/dev/null 2>&1
|
||||||
|
restorecon -rF /sys/fs/cgroup >/dev/null 2>&1
|
||||||
|
eend $?
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
local retval
|
local retval
|
||||||
@ -133,5 +145,8 @@ start()
|
|||||||
mount_cgroups
|
mount_cgroups
|
||||||
retval=$?
|
retval=$?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
restorecon_sys
|
||||||
|
|
||||||
return $retval
|
return $retval
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user