initscripts/etc/rc.d/init.d/mountproc

48 lines
1.3 KiB
Plaintext
Raw Normal View History

2011-04-26 12:26:24 +02:00
#!/bin/sh
# mountproc - mount /proc and /sysfs (kernel 2.6.x only)
# Copyright (C) 2004-2011 Silvan Calarco <silvan.calarco@mambasoft.it>
2011-04-26 12:26:24 +02:00
# Copyright (C) 2004-2009 Davide Madrisan <davide.madrisan@gmail.com>
. /etc/sysconfig/rc
. $rc_functions
[ -e /etc/locale.conf ] && . /etc/locale.conf || . /etc/sysconfig/i18n
2011-04-26 12:26:24 +02:00
LC_ALL=$LANG
TEXTDOMAIN=initscripts
TEXTDOMAINDIR=/usr/share/locale/
if [ ! -e /proc/version ]; then
echo -n "Mounting proc file system: "
mount -n -t proc proc /proc
evaluate_retval
echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
echo
fi
progress=5
$PLYMOUTH message --text=$"System booting, please wait..."
$PLYMOUTH update --status="$progress"
2011-04-26 12:26:24 +02:00
if [ ! -e /sys/kernel ]; then
2011-04-26 12:26:24 +02:00
echo -n "Mounting sys file system: "
mount -n -t sysfs sysfs /sys
evaluate_retval
echo
fi
if [ ! "`grep ' /dev ' /proc/mounts`" ]; then
[ "`grep devtmpfs /proc/filesystems`" ] && \
mount -n -t devtmpfs udev /dev || \
mount -n -t tmpfs udev /dev
fi
if [ ! "`grep ' /run ' /proc/mounts`" ]; then
mount -n -t tmpfs tmpfs /run
fi
if [ ! "`grep ' /dev/pts ' /proc/mounts`" ]; then
mkdir -p /dev/pts
mount -n -t devpts devpts /dev/pts -o gid=4,mode=620
fi
if [ ! "`grep ' /dev/shm ' /proc/mounts`" ]; then
mkdir -p /dev/shm
mount -n -t tmpfs devshm /dev/shm
fi