|
发表于 2003-4-3 20:51:29
|
显示全部楼层
在我这里,是用/etc/rc.d/init.d/mountfs来加载分区的,在不同的运行级里,又在调用这个脚本,这个脚本的内容如下:
- #!/bin/bash
- # Begin $rc_base/init.d/mountfs - File System Mount Script
-
- # Based on mountfs script from LFS-3.1 and earlier.
- # Rewritten by Gerard Beekmans - [email]gerard@linuxfromscratch.org[/email]
-
- source /etc/sysconfig/rc
- source $rc_functions
-
- case "$1" in
- start)
- echo "Remounting root file system in read-write mode..."
- mount -n -o remount,rw /
- evaluate_retval
-
- # 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<filesystem> will be skipped.
-
- NO_FS="nonfs,nosmbfs,noproc"
- echo "Mounting remaining file systems..."
- mount -a -t $NO_FS
- evaluate_retval
- ;;
-
- stop)
- echo "Unmounting all other currently mounted file systems..."
- umount -a -r
- evaluate_retval
- ;;
-
- *)
- echo "Usage: $0 {start|stop}"
- exit 1
- ;;
- esac
-
- # End $rc_base/init.d/mountfs
-
复制代码 |
|