filesystem: mount devtmpfs if not already mounted.

This commit is contained in:
Ricardo Martins 2015-02-08 15:50:41 +00:00
parent 0456bd2193
commit bbbdb9d54e

View File

@ -14,6 +14,10 @@ fi
sysinit()
{
if ! [ -c /dev/null ]; then
mount -t devtmpfs devtmpfs /dev
fi
if [ -f /.reboot ]; then
mount -t proc proc /proc
mount -o remount,rw /
@ -23,36 +27,33 @@ sysinit()
return 0
fi
# Mount pseudo-filesystems.
# Mount pseudo-filesystems.
mount -t sysfs sysfs /sys &&
mount -t proc proc /proc &&
mkdir /dev/shm /dev/pts &&
mount -t tmpfs -o size="$cfg_tmpfs_size" tmpfs /dev/shm &&
mount -t devpts devpts /dev/pts &&
# Register mdev as hotplug event handler.
# Register mdev as hotplug event handler.
echo >/dev/mdev.seq &&
echo /sbin/mdev > /proc/sys/kernel/hotplug &&
# Update ld cache, populate /dev.
# mount -o remount,rw / &&
# Update ld cache, populate /dev.
/sbin/mdev -s &&
# /sbin/ldconfig &&
# mount -o remount,ro / &&
# Set minimum free kbytes.
# Set minimum free kbytes.
echo "$cfg_min_free_kbytes" > /proc/sys/vm/min_free_kbytes &&
# Set hostname.
# Set hostname.
hostname "$cfg_hostname" &&
# Loopback device.
# Loopback device.
ifconfig lo 127.0.0.1 netmask 255.0.0.0 up &&
# Load modules.
# Load modules.
modprobe -a $cfg_modules $cfg_modules1
# Start services.
# Start services.
for service in $cfg_services0 $cfg_services1 $cfg_services2; do
. /etc/rc.d/$service
start