Compare commits

..

4 Commits

Author SHA1 Message Date
William Hubbs
2eb0ea9afb Make sysfs behave like netmount and localmount
sysfs now mounts all related sysfs file systems and returns success,
like netmount and localmount.

Also, we now check to make sure the cgroups are not mounted before we
mount them.

X-Gentoo-Bug: 530138
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=530138
2014-11-23 21:59:01 -06:00
William Hubbs
534031fc7a Start work on 0.13.6 2014-11-23 21:57:44 -06:00
William Hubbs
6b85d4288c devfs: optionally add missing symbolic links
If symbolic links for /dev/{fd,stdin,stdout,stderr,core} do not exist
once /dev is mounted, we should create them.
2014-11-20 11:07:14 -06:00
William Hubbs
dec899b946 Start work on 0.13.5 2014-11-20 11:06:03 -06:00
3 changed files with 14 additions and 18 deletions

View File

@@ -1,3 +1,3 @@
NAME= openrc
VERSION= 0.13.4
VERSION= 0.13.6
PKG= ${NAME}-${VERSION}

View File

@@ -69,7 +69,14 @@ seed_dev()
# so udev can add its start-message to dmesg
[ -c /dev/kmsg ] || mknod -m 660 /dev/kmsg c 1 11
# Mount required stuff as user may not have then in /etc/fstab
# extra symbolic links not provided by default
[ -e /dev/fd ] || ln -snf /proc/self/fd /dev/fd
[ -e /dev/stdin ] || ln -snf /proc/self/fd/0 /dev/stdin
[ -e /dev/stdout ] || ln -snf /proc/self/fd/1 /dev/stdout
[ -e /dev/stderr ] || ln -snf /proc/self/fd/2 /dev/stderr
[ -e /proc/kcore ] && ln -snf /proc/kcore /dev/core
# Mount required directories as user may not have them in /etc/fstab
for x in \
"mqueue /dev/mqueue 1777 ,nodev mqueue" \
"devpts /dev/pts 0755 ,gid=5,mode=0620 devpts" \

View File

@@ -113,7 +113,8 @@ mount_cgroups()
yesno ${rc_controller_cgroups:-YES} && [ -e /proc/cgroups ] || return 0
while read name hier groups enabled rest; do
case "${enabled}" in
1) mkdir /sys/fs/cgroup/${name}
1) mountinfo -q /sys/fs/cgroup/${name} && continue
mkdir /sys/fs/cgroup/${name}
mount -n -t cgroup -o ${sysfs_opts},${name} \
${name} /sys/fs/cgroup/${name}
;;
@@ -129,25 +130,13 @@ restorecon_sys()
restorecon -rF /sys/fs/cgroup >/dev/null 2>&1
eend $?
fi
return 0
}
start()
{
local retval
mount_sys
retval=$?
if [ $retval -eq 0 ]; then
mount_misc
retval=$?
fi
if [ $retval -eq 0 ]; then
mount_cgroups
retval=$?
fi
mount_misc
mount_cgroups
restorecon_sys
return $retval
return 0
}