source: bootscripts/lfs/init.d/mountfs@ 94cea1d

10.0 10.0-rc1 10.1 10.1-rc1 11.0 11.0-rc1 11.0-rc2 11.0-rc3 11.1 11.1-rc1 11.2 11.2-rc1 8.1 8.1-rc1 8.1-rc2 8.2 8.2-rc1 8.3 8.3-rc1 8.3-rc2 8.4 8.4-rc1 9.0 9.0-rc1 9.1 9.1-rc1 arm cross-chap5 ml-11.0 multilib old-trunk s6-init trunk xry111/arm64 xry111/clfs-ng xry111/git-transition xry111/glibc-2.34 xry111/glibc-2.37 xry111/lfs-next xry111/pip3 xry111/queue-11.3 xry111/rust-wip-20221008 xry111/tester-nohack xry111/usr-move
Last change on this file since 94cea1d was 94cea1d, checked in by Bruce Dubbs <bdubbs@…>, 6 years ago

Remove section disussing configuration without a network card.
Update boot scripts to unmount network file systems before bringing down the network.

git-svn-id: http://svn.linuxfromscratch.org/LFS/trunk/BOOK@11260 4aa44e1e-78dd-0310-a6d2-fbcd4c07a689

  • Property mode set to 100644
File size: 2.3 KB
Line 
1#!/bin/sh
2########################################################################
3# Begin mountfs
4#
5# Description : File System Mount Script
6#
7# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
8# DJ Lucas - dj@linuxfromscratch.org
9# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
10#
11# Version : LFS 7.0
12#
13########################################################################
14
15### BEGIN INIT INFO
16# Provides: $local_fs
17# Required-Start: udev checkfs
18# Should-Start:
19# Required-Stop: swap
20# Should-Stop:
21# Default-Start: S
22# Default-Stop: 0 6
23# Short-Description: Mounts/unmounts local filesystems defined in /etc/fstab.
24# Description: Remounts root filesystem read/write and mounts all
25# remaining local filesystems defined in /etc/fstab on
26# start. Remounts root filesystem read-only and unmounts
27# remaining filesystems on stop.
28# X-LFS-Provided-By: LFS
29### END INIT INFO
30
31. /lib/lsb/init-functions
32
33case "${1}" in
34 start)
35 log_info_msg "Remounting root file system in read-write mode..."
36 mount --options remount,rw / >/dev/null
37 evaluate_retval
38
39 # Remove fsck-related file system watermarks.
40 rm -f /fastboot /forcefsck
41
42 # Make sure /dev/pts exists
43 mkdir -p /dev/pts
44
45 # This will mount all filesystems that do not have _netdev in
46 # their option list. _netdev denotes a network filesystem.
47
48 log_info_msg "Mounting remaining file systems..."
49 mount --all --test-opts no_netdev >/dev/null
50 evaluate_retval
51 exit $failed
52 ;;
53
54 stop)
55 # Don't unmount virtual file systems like /run
56 log_info_msg "Unmounting all other currently mounted file systems..."
57 umount --all --detach-loop --read-only \
58 --types notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
59 evaluate_retval
60
61 # Make sure / is mounted read only (umount bug)
62 mount --test-opts remount,ro /
63
64 # Make all LVM volume groups unavailable, if appropriate
65 # This fails if swap or / are on an LVM partition
66 #if [ -x /sbin/vgchange ]; then /sbin/vgchange -an > /dev/null; fi
67 ;;
68
69 *)
70 echo "Usage: ${0} {start|stop}"
71 exit 1
72 ;;
73esac
74
75# End mountfs
Note: See TracBrowser for help on using the repository browser.