Skip to content

Commit 98363ca

Browse files
Kurt J. Boschteg
Kurt J. Bosch
authored andcommitted
functions/netfs: Refactor filesystem type lists and $NETFS
Currently $NETFS is used only for fsck and mount in rc.sysinit. Since we moved it into functions, we can use it in netfs too to get rid of redundancy. functions: * Move 'nosysfs' from $NETFS into the mount -a type list because thats obviously the only meaningfull place. * Add 'nofuse.glusterfs' to $NETFS to match the lists in netfs. * Remove all 'no'-prefixes from $NETFS to make it more useful and readable. * Add 'no'-prefixes to fsck and mount -a commands by parameter substitution. netfs: * Instead of the literals use $NETFS from functions which contains the same types now
1 parent a16cbae commit 98363ca

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

functions

+3-3
Original file line numberDiff line numberDiff line change
@@ -370,11 +370,11 @@ read_crypttab() {
370370

371371
# Filesystem functions
372372
# These can be overridden/reused for customizations like shutdown/loop-fsck.
373-
NETFS="nonfs,nonfs4,nosmbfs,nocifs,nocodafs,noncpfs,nosysfs,noshfs,nofuse,nofuseblk,noglusterfs,nodavfs"
373+
NETFS="nfs,nfs4,smbfs,cifs,codafs,ncpfs,shfs,fuse,fuseblk,glusterfs,davfs,fuse.glusterfs"
374374

375375
# Check local filesystems
376376
fsck_all() {
377-
fsck -A -T -C$FSCK_FD -a -t "$NETFS,noopts=_netdev" $FORCEFSCK
377+
fsck -A -T -C$FSCK_FD -a -t "no${NETFS//,/,no},noopts=_netdev" $FORCEFSCK
378378
return $?
379379
}
380380

@@ -414,7 +414,7 @@ fsck_reboot() {
414414
}
415415

416416
mount_all() {
417-
mount -a -t "$NETFS" -O no_netdev
417+
mount -a -t "nosysfs,no${NETFS//,/,no}" -O no_netdev
418418
}
419419

420420
bootlogd_stop() {

netfs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
case "$1" in
88
start)
99
stat_busy "Mounting Network Filesystems"
10-
mount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs,davfs
10+
mount -a -t "$NETFS"
1111
rc=$?
1212
mount -a -O _netdev
1313
(( rc || $? )) && stat_die
@@ -18,7 +18,7 @@ case "$1" in
1818
stat_busy "Unmounting Network Filesystems"
1919
umount -a -O _netdev
2020
rc=$?
21-
umount -a -t nfs,nfs4,smbfs,codafs,ncpfs,cifs,shfs,glusterfs,fuse,fuseblk,fuse.glusterfs,davfs
21+
umount -a -t "$NETFS"
2222
(( rc || $? )) && stat_die
2323
rm_daemon netfs
2424
stat_done

0 commit comments

Comments
 (0)