#!/bin/sh # mountfs - File System Mount Script # Based on mountfs script from LFS-3.1 and earlier. # Rewritten by Gerard Beekmans # Modified by Davide Madrisan . /etc/sysconfig/rc . $rc_functions case "$1" in start) echo -n "Remounting root file system in read-write mode: " mount -n -o remount,rw / evaluate_retval echo # Dump dmesg to log file dmesg > /var/log/dmesg.log # Check that mtab is a symlink to /proc/mounts [ -L /etc/mtab ] || { rm -f /etc/mtab # delete if not a symlink rm -f /etc/mtab~ /etc/mtab~~ ln -s /proc/mounts /etc/mtab } $PLYMOUTH --sysinit # The follow mount command will mount all file systems. If you # have other (network based) file system that should not be or # cannot be mounted at this time, add them to the NO_FS variable # below. All file systems that are added to the variable in the # form of no will be skipped. NO_FS="nonfs,nonfs4,nosmbfs,nocifs,noproc,nosysfs,nousbdevfs,nodevfs" echo -n "Mounting remaining file systems: " mount -a -t $NO_FS evaluate_retval echo ;; stop) echo -n "Unmounting all other currently mounted file systems: " # [ -f /proc/bus/usb/devices ] && umount /proc/bus/usb >/dev/null 2>&1 # umount -l /proc # umount -l /sys NO_FS="nonfs,nonfs4,nosmbfs,nocifs,noproc,nosysfs,nousbdevfs,nodevfs" sync umount -a -f -r -t $NO_FS >/dev/null 2>&1 evaluate_retval echo ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac