Browse Source

mounting sysfs when available (e.g. 2.5/2.6) (untested ...)

git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@2088 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc
rocklinux
Rene Rebe 21 years ago
parent
commit
fc183a2193
4 changed files with 11 additions and 11 deletions
  1. +1
    -0
      package/base/00-dirtree/data.txt
  2. +1
    -0
      package/base/sysfiles/etc_fstab.txt
  3. +1
    -0
      package/base/sysfiles/stone_mod_setup.sh
  4. +8
    -11
      package/base/sysfiles/system.init

+ 1
- 0
package/base/00-dirtree/data.txt

@ -47,6 +47,7 @@ m opt
m proc
m root
m sbin
m sys
m tmp
m usr
m usr/bin

+ 1
- 0
package/base/sysfiles/etc_fstab.txt

@ -3,4 +3,5 @@ none /proc proc defaults 0 0
none /dev devfs defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0

+ 1
- 0
package/base/sysfiles/stone_mod_setup.sh

@ -31,6 +31,7 @@ none /proc proc defaults 0 0
none /dev devfs defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0
EOT

+ 8
- 11
package/base/sysfiles/system.init

@ -27,24 +27,20 @@
#
main_begin
block_begin(start, `Mounting /dev, /proc and /dev/shm.')
block_begin(start, `Mounting /dev, /proc, /sys and /dev/shm.')
check(`[ -e /dev/.devfsd ] || mount -n /dev')
check(`mount -n /proc')
check(`grep -q sysfs /proc/filesystems && mount -n /sys')
check(`mount -n /dev/shm')
mount -n /dev/pts 2> /dev/null
dnl
if [ -f /etc/conf/hardware ]; then
if [ -f /etc/conf/hardware ] ; then
. /etc/conf/hardware
fi
dnl
block_split(`Configuring the /dev filesystem ...')
check(`sh /etc/conf/devfs')
if [ -f /etc/raidtab ]; then
block_split(`Starting softraid systems ...')
check(`/sbin/raidstart --all')
fi
dnl
block_split(`Activating swap devices.')
check(`swapon -a')
dnl
@ -77,7 +73,7 @@ dnl
rootdev="/dev/$(ls -l /dev/root | sed 's,.* -> ,,')"
check(`grep -v "^rootfs " /proc/mounts | \
sed "s,^/dev/root ,$rootdev ," > /etc/mtab')
check(`mount -a -t nocoda,nfs')
check(`mount -a -t nocoda,nfs,devfs,proc,sysfs')
dnl
if [ "$HARDWARE_SETUP" = rockplug ]; then
block_split(`Configuring hardware by activating rockplug.')
@ -192,6 +188,7 @@ dnl
[ "$dir" = "/dev" ] && continue
[ "$dir" = "/dev/shm" ] && continue
[ "$dir" = "/proc" ] && continue
[ "$dir" = "/sys" ] && continue
[ "$dir" = "/tmp" ] && continue
echo "Umounting $dev on $dir ($fs)."
mount -o remount,sync $dir
@ -202,7 +199,7 @@ dnl
block_split(`Unmounting remaining file systems.')
grep -E -v '^none (/|[a-z]+:) ' /proc/mounts > /etc/mtab
sync ; sleep 1 ; sync
umount -vnra -t noproc,devfs,shm
umount -vnra -t nodevfs,proc,sysfs,shm
mount -vn -o remount,sync /
mount -vn -o remount,ro /
sleep 1 ; sync ; sleep 1

|||||||
100:0
Loading…
Cancel
Save