devfs: several small clarifications

- Rename the static_dev switch in conf.d/devfs to skip_mount_dev since
  this is a better description of what the switch does.

- Clarify the error messages in the devfs service script based on the
  new name of the switch.
This commit is contained in:
William Hubbs 2014-08-08 14:49:00 -05:00
parent 647e08eb91
commit 6a337ff6c5
2 changed files with 16 additions and 8 deletions

View File

@ -1,2 +1,8 @@
# Set this to yes if your /dev is not a devtmpfs or tmpfs. # OpenRC will attempt each of the following in succession to mount /dev.
# static_dev="NO" #
# 1. If there is an entry for /dev in fstab, it will be used.
# 2. If devtmpfs is defined in the kernel, it will be used.
# 3. If tmpfs is defined in the kernel, it will be used.
#
# Set this to yes if you do not want OpenRC to attempt to mount /dev.
# skip_mount_dev="NO"

View File

@ -16,8 +16,8 @@ mount_dev()
local action=--mount devfstype msg=Mounting local action=--mount devfstype msg=Mounting
# Some devices require exec, Bug #92921 # Some devices require exec, Bug #92921
local mountopts="exec,nosuid,mode=0755" local mountopts="exec,nosuid,mode=0755"
if yesno ${static_dev:-no}; then if yesno ${skip_mount_dev:-no} ; then
einfo "Using static /dev" einfo "/dev will not be mounted due to user request"
return 0 return 0
fi fi
if mountinfo -q /dev; then if mountinfo -q /dev; then
@ -43,11 +43,13 @@ mount_dev()
mount -n -t $devfstype -o $mountopts dev /dev mount -n -t $devfstype -o $mountopts dev /dev
eend $? eend $?
else else
ewarn "This kernel does not have devtmpfs or tmpfs support." ewarn "This kernel does not have devtmpfs or tmpfs support, and there"
ewarn "Assuming you want static /dev. If this is not the case," ewarn "is no entry for /dev in fstab."
ewarn "please set the CONFIG_DEVTMPFS or CONFIG_TMPFS option" ewarn "This means /dev will not be mounted."
ewarn "in your kernel." ewarn "To avoid this message, set CONFIG_DEVTMPFS or CONFIG_TMPFS to y"
ewarn "in your kernel configuration or see @SYSCONFDIR@/conf.d/devfs"
fi fi
return 0
} }
seed_dev() seed_dev()