Skip to Content.
Sympa Menu

sm-commit - [SM-Commit] GIT changes to master grimoire by Justin Boffemmyer (895cc0803dc99b72d8aff0ea5b83f72b92b3f2be)

sm-commit AT lists.ibiblio.org

Subject: Source Mage code commit list

List archive

Chronological Thread  
  • From: Justin Boffemmyer <scm AT sourcemage.org>
  • To: sm-commit AT lists.ibiblio.org
  • Subject: [SM-Commit] GIT changes to master grimoire by Justin Boffemmyer (895cc0803dc99b72d8aff0ea5b83f72b92b3f2be)
  • Date: Sun, 10 Aug 2008 18:18:40 -0500

GIT changes to master grimoire by Justin Boffemmyer <flux AT sourcemage.org>:

smgl/init.d/init.d/devices | 2 +-
smgl/init.d/init.d/devices.conf | 22 +++++++++++++++++++++-
2 files changed, 22 insertions(+), 2 deletions(-)

New commits:
commit 895cc0803dc99b72d8aff0ea5b83f72b92b3f2be
Author: Justin Boffemmyer <flux AT sourcemage.org>
Commit: Justin Boffemmyer <flux AT sourcemage.org>

init.d/devices{,.conf}: corrected for udev sanity

Added some conditional logic to ensure sanity with udev. This relieves
the devices init script of its reliance on the /etc/udev/udev.conf
file, and subsequently makes our init more robust. Additionally, I
also modified both to use tmpfs by default, and made it configurable
via the sysconfig config file (devices.conf). All of this takes place
only if DEVICES=udev. I also changed the installed default DEVICES
value from devfs (which I'm betting not many people use anymore) to
static.

diff --git a/smgl/init.d/init.d/devices b/smgl/init.d/init.d/devices
index a2db4b1..7bd0b4c 100755
--- a/smgl/init.d/init.d/devices
+++ b/smgl/init.d/init.d/devices
@@ -33,7 +33,7 @@ start_udev()
echo "Mounting sysfs at /sys"
mount -n -t sysfs none /sys
echo "Mounting ramfs at $udev_root"
- mount -n -t ramfs none $udev_root
+ mount -n -t "$DEVTYPE" none "$DEVROOT"
# create some needed stuff
ln -s /proc/self/fd $udev_root/fd
ln -s /dev/fd/0 $udev_root/stdin
diff --git a/smgl/init.d/init.d/devices.conf b/smgl/init.d/init.d/devices.conf
index 287f0cc..873e288 100644
--- a/smgl/init.d/init.d/devices.conf
+++ b/smgl/init.d/init.d/devices.conf
@@ -1,2 +1,22 @@
# type of device management, "static", "devfs" or "udev"
-DEVICES=devfs
+DEVICES=static
+
+# If using udev, you can set the device tree (DEVROOT) to be anywhere you
want.
+# The normal sane value for this is /dev, but if you're adventurous you can
try
+# something else. Since this may also be defined in /etc/udev/udev.conf, and
it
+# makes sense to have the init script use the same device tree as udev, this
is
+# set to track the udev config file's value for udev_root. It will default to
+# /dev if udev_root is not defined in /etc/udev/udev.conf, or if
+# /etc/udev/udev.conf does not exist. Change it at your own risk.
+if [[ "$DEVICES" == udev ]]
+then
+ if [[ -e /etc/udev/udev.conf ]]
+ . /etc/udev/udev.conf
+ fi
+ DEVROOT="${udev_root:=/dev}"
+# DEVTYPE defines what type of filesystem should be mounted on DEVROOT.
+# Normally, you would want this to be either tmpfs or ramfs, where tmpfs is
+# considered to deprecate ramfs. Make sure you have tmpfs support in your
+# kernel if you want to use tmpfs.
+ DEVTYPE="tmpfs"
+fi



  • [SM-Commit] GIT changes to master grimoire by Justin Boffemmyer (895cc0803dc99b72d8aff0ea5b83f72b92b3f2be), Justin Boffemmyer, 08/10/2008

Archive powered by MHonArc 2.6.24.

Top of Page