aboutsummaryrefslogtreecommitdiffstats
path: root/main/zfs/dont-fsck-or-mount-umount-fstab-entries.patch
blob: 238516ce4f5bf188c5eae7dc9ca2efe7d55c9eea (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
--- a/etc/init.d/zfs-mount.in
+++ b/etc/init.d/zfs-mount.in
@@ -70,50 +70,6 @@ do_mount()
 	zfs_action "Mounting ZFS filesystem(s)" \
 	    "$ZFS" mount -a$verbose$overlay "$MOUNT_EXTRA_OPTIONS"
 
-	# Require each volume/filesystem to have 'noauto' and no fsck
-	# option. This shouldn't really be necessary, as long as one
-	# can get zfs-import to run sufficiently early on in the boot
-	# process - before local mounts. This is just here in case/if
-	# this isn't possible.
-	check_boolean "$VERBOSE_MOUNT" && \
-	    zfs_log_begin_msg "Mounting volumes and filesystems registered in fstab"
-
-	read_mtab  "^/dev/(zd|zvol)"
-	read_fstab "^/dev/(zd|zvol)"
-	i=0; var="FSTAB_0"
-	while [ -n "$(eval echo "\$$var")" ]
-	do
-		mntpt=$(eval echo "\$$var")
-		dev=$(eval echo "\$FSTAB_dev_$i")
-		if ! in_mtab "$mntpt" && ! is_mounted "$mntpt" && [ -e "$dev" ]
-		then
-			check_boolean "$VERBOSE_MOUNT" && \
-				zfs_log_progress_msg "$mntpt "
-			fsck "$dev" && mount "$mntpt"
-		fi
-
-		i=$((i + 1))
-		var=$(eval echo "FSTAB_$i")
-	done
-
-	read_mtab  "[[:space:]]zfs[[:space:]]"
-	read_fstab "[[:space:]]zfs[[:space:]]"
-	i=0; var=$(eval echo "FSTAB_$i")
-	while [ -n "$(eval echo "\$$var")" ]
-	do
-		mntpt=$(eval echo "\$$var")
-		if ! in_mtab "$mntpt" && ! is_mounted "$mntpt"
-		then
-			check_boolean "$VERBOSE_MOUNT" && \
-				zfs_log_progress_msg "$mntpt "
-			mount "$mntpt"
-		fi
-
-		i=$((i + 1))
-		var=$(eval echo "FSTAB_$i")
-	done
-	check_boolean "$VERBOSE_MOUNT" && zfs_log_end_msg 0
-
 	return 0
 }
 
@@ -128,44 +84,6 @@ do_unmount()
 	# this isn't possible.
 	zfs_action "Unmounting ZFS filesystems" "$ZFS" unmount -a
 
-	check_boolean "$VERBOSE_MOUNT" && \
-	    zfs_log_begin_msg "Unmounting volumes and filesystems registered in fstab"
-
-	read_mtab  "^/dev/(zd|zvol)"
-	read_fstab "^/dev/(zd|zvol)"
-	i=0; var="FSTAB_0"
-	while [ -n "$(eval echo "\$$var")" ]
-	do
-		mntpt=$(eval echo "\$$var")
-		dev=$(eval echo "\$FSTAB_dev_$i")
-		if in_mtab "$mntpt"
-		then
-			check_boolean "$VERBOSE_MOUNT" && \
-				zfs_log_progress_msg "$mntpt "
-			umount "$mntpt"
-		fi
-
-		i=$((i + 1))
-		var=$(eval echo "FSTAB_$i")
-	done
-
-	read_mtab  "[[:space:]]zfs[[:space:]]"
-	read_fstab "[[:space:]]zfs[[:space:]]"
-	i=0; var="FSTAB_0"
-	while [ -n "$(eval echo "\$$var")" ]
-	do
-		mntpt=$(eval echo "\$$var")
-		if in_mtab "$mntpt"; then
-			check_boolean "$VERBOSE_MOUNT" && \
-			    zfs_log_progress_msg "$mntpt "
-			umount "$mntpt"
-		fi
-
-		i=$((i + 1))
-		var=$(eval echo "FSTAB_$i")
-	done
-	check_boolean "$VERBOSE_MOUNT" && zfs_log_end_msg 0
-
 	return 0
 }