source: bootscripts/lfs/init.d/mountfs@ 305ab2a

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 11.3 11.3-rc1 12.0 12.0-rc1 12.1 12.1-rc1 arm bdubbs/gcc13 ml-11.0 multilib renodr/libudev-from-systemd s6-init trunk xry111/arm64 xry111/arm64-12.0 xry111/clfs-ng xry111/lfs-next xry111/loongarch xry111/loongarch-12.0 xry111/loongarch-12.1 xry111/mips64el xry111/pip3 xry111/rust-wip-20221008 xry111/update-glibc
Last change on this file since 305ab2a was 305ab2a, checked in by Bruce Dubbs <bdubbs@…>, 3 years ago

Update to bc-3.2.6.
Update to glibc-2.33.
Minor change to mountfs boot script.

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

  • Property mode set to 100644
File size: 2.4 KB
RevLine 
[1c48007]1#!/bin/sh
2########################################################################
[0cda898]3# Begin mountfs
[1c48007]4#
5# Description : File System Mount Script
6#
7# Authors : Gerard Beekmans - gerard@linuxfromscratch.org
[f874424]8# DJ Lucas - dj@linuxfromscratch.org
[0cda898]9# Update : Bruce Dubbs - bdubbs@linuxfromscratch.org
[1c48007]10#
[0cda898]11# Version : LFS 7.0
[1c48007]12#
13########################################################################
14
[0cda898]15### BEGIN INIT INFO
16# Provides: $local_fs
17# Required-Start: udev checkfs
[6903d5e]18# Should-Start: modules
[11e7880]19# Required-Stop: localnet
[0cda898]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
[f874424]31. /lib/lsb/init-functions
[1c48007]32
33case "${1}" in
[0cda898]34 start)
[f874424]35 log_info_msg "Remounting root file system in read-write mode..."
[94cea1d]36 mount --options remount,rw / >/dev/null
[0cda898]37 evaluate_retval
38
39 # Remove fsck-related file system watermarks.
40 rm -f /fastboot /forcefsck
41
[cba2d4e]42 # Make sure /dev/pts exists
43 mkdir -p /dev/pts
44
[0cda898]45 # This will mount all filesystems that do not have _netdev in
46 # their option list. _netdev denotes a network filesystem.
[f874424]47
48 log_info_msg "Mounting remaining file systems..."
[305ab2a]49 failed=0
50 mount --all --test-opts no_netdev >/dev/null || failed=1
[0cda898]51 evaluate_retval
[f874424]52 exit $failed
[0cda898]53 ;;
54
55 stop)
[28c4c1e]56 # Don't unmount virtual file systems like /run
[f874424]57 log_info_msg "Unmounting all other currently mounted file systems..."
[16334b4]58 # Ensure any loop devies are removed
59 losetup -D
[94cea1d]60 umount --all --detach-loop --read-only \
61 --types notmpfs,nosysfs,nodevtmpfs,noproc,nodevpts >/dev/null
[0cda898]62 evaluate_retval
[f158011]63
[28c4c1e]64 # Make sure / is mounted read only (umount bug)
[4584c15]65 mount --options remount,ro /
[df02b59]66
[f158011]67 # Make all LVM volume groups unavailable, if appropriate
[7b08ae24]68 # This fails if swap or / are on an LVM partition
69 #if [ -x /sbin/vgchange ]; then /sbin/vgchange -an > /dev/null; fi
[0cda898]70 ;;
71
72 *)
73 echo "Usage: ${0} {start|stop}"
74 exit 1
75 ;;
[1c48007]76esac
77
[0cda898]78# End mountfs
Note: See TracBrowser for help on using the repository browser.