head 1.15; access; symbols netbsd-10-0-RELEASE:1.15 netbsd-10-0-RC6:1.15 netbsd-10-0-RC5:1.15 netbsd-10-0-RC4:1.15 netbsd-10-0-RC3:1.15 netbsd-10-0-RC2:1.15 netbsd-10-0-RC1:1.15 netbsd-10:1.15.0.6 netbsd-10-base:1.15 netbsd-9-3-RELEASE:1.10.4.3 cjep_sun2x-base1:1.15 cjep_sun2x:1.15.0.4 cjep_sun2x-base:1.15 cjep_staticlib_x-base1:1.15 netbsd-9-2-RELEASE:1.10.4.3 cjep_staticlib_x:1.15.0.2 cjep_staticlib_x-base:1.15 netbsd-9-1-RELEASE:1.10.4.2 phil-wifi-20200421:1.13 phil-wifi-20200411:1.13 is-mlppp:1.13.0.2 is-mlppp-base:1.13 phil-wifi-20200406:1.13 netbsd-8-2-RELEASE:1.9 netbsd-9-0-RELEASE:1.10.4.1 netbsd-9-0-RC2:1.10.4.1 netbsd-9-0-RC1:1.10.4.1 phil-wifi-20191119:1.11 netbsd-9:1.10.0.4 netbsd-9-base:1.10 phil-wifi-20190609:1.10 netbsd-8-1-RELEASE:1.9 netbsd-8-1-RC1:1.9 pgoyette-compat-merge-20190127:1.9.22.1 pgoyette-compat-20190127:1.10 pgoyette-compat-20190118:1.10 pgoyette-compat-1226:1.10 pgoyette-compat-1126:1.10 pgoyette-compat-1020:1.10 pgoyette-compat-0930:1.10 pgoyette-compat-0906:1.10 netbsd-7-2-RELEASE:1.9 pgoyette-compat-0728:1.10 netbsd-8-0-RELEASE:1.9 phil-wifi:1.10.0.2 phil-wifi-base:1.10 pgoyette-compat-0625:1.10 netbsd-8-0-RC2:1.9 pgoyette-compat-0521:1.9 pgoyette-compat-0502:1.9 pgoyette-compat-0422:1.9 netbsd-8-0-RC1:1.9 pgoyette-compat-0415:1.9 pgoyette-compat-0407:1.9 pgoyette-compat-0330:1.9 pgoyette-compat-0322:1.9 pgoyette-compat-0315:1.9 netbsd-7-1-2-RELEASE:1.9 pgoyette-compat:1.9.0.22 pgoyette-compat-base:1.9 netbsd-7-1-1-RELEASE:1.9 matt-nb8-mediatek:1.9.0.20 matt-nb8-mediatek-base:1.9 perseant-stdc-iso10646:1.9.0.18 perseant-stdc-iso10646-base:1.9 netbsd-8:1.9.0.16 netbsd-8-base:1.9 prg-localcount2-base3:1.9 prg-localcount2-base2:1.9 prg-localcount2-base1:1.9 prg-localcount2:1.9.0.14 prg-localcount2-base:1.9 pgoyette-localcount-20170426:1.9 bouyer-socketcan-base1:1.9 pgoyette-localcount-20170320:1.9 netbsd-7-1:1.9.0.12 netbsd-7-1-RELEASE:1.9 netbsd-7-1-RC2:1.9 netbsd-7-nhusb-base-20170116:1.9 bouyer-socketcan:1.9.0.10 bouyer-socketcan-base:1.9 pgoyette-localcount-20170107:1.9 netbsd-7-1-RC1:1.9 pgoyette-localcount-20161104:1.9 netbsd-7-0-2-RELEASE:1.9 localcount-20160914:1.9 netbsd-7-nhusb:1.9.0.8 netbsd-7-nhusb-base:1.9 pgoyette-localcount-20160806:1.9 pgoyette-localcount-20160726:1.9 pgoyette-localcount:1.9.0.6 pgoyette-localcount-base:1.9 netbsd-7-0-1-RELEASE:1.9 netbsd-7-0:1.9.0.4 netbsd-7-0-RELEASE:1.9 netbsd-7-0-RC3:1.9 netbsd-7-0-RC2:1.9 netbsd-7-0-RC1:1.9 netbsd-5-2-3-RELEASE:1.4 netbsd-5-1-5-RELEASE:1.4 netbsd-6-0-6-RELEASE:1.8 netbsd-6-1-5-RELEASE:1.8 netbsd-7:1.9.0.2 netbsd-7-base:1.9 yamt-pagecache-base9:1.8 yamt-pagecache-tag8:1.8 netbsd-6-1-4-RELEASE:1.8 netbsd-6-0-5-RELEASE:1.8 tls-earlyentropy:1.8.0.24 tls-earlyentropy-base:1.9 riastradh-xf86-video-intel-2-7-1-pre-2-21-15:1.8 riastradh-drm2-base3:1.8 netbsd-6-1-3-RELEASE:1.8 netbsd-6-0-4-RELEASE:1.8 netbsd-5-2-2-RELEASE:1.4 netbsd-5-1-4-RELEASE:1.4 netbsd-6-1-2-RELEASE:1.8 netbsd-6-0-3-RELEASE:1.8 netbsd-5-2-1-RELEASE:1.4 netbsd-5-1-3-RELEASE:1.4 netbsd-6-1-1-RELEASE:1.8 riastradh-drm2-base2:1.8 riastradh-drm2-base1:1.8 riastradh-drm2:1.8.0.16 riastradh-drm2-base:1.8 netbsd-6-1:1.8.0.22 netbsd-6-0-2-RELEASE:1.8 netbsd-6-1-RELEASE:1.8 khorben-n900:1.8.0.20 netbsd-6-1-RC4:1.8 netbsd-6-1-RC3:1.8 agc-symver:1.8.0.18 agc-symver-base:1.8 netbsd-6-1-RC2:1.8 netbsd-6-1-RC1:1.8 yamt-pagecache-base8:1.8 netbsd-5-2:1.4.0.44 netbsd-6-0-1-RELEASE:1.8 yamt-pagecache-base7:1.8 netbsd-5-2-RELEASE:1.4 netbsd-5-2-RC1:1.4 matt-nb6-plus-nbase:1.8 yamt-pagecache-base6:1.8 netbsd-6-0:1.8.0.14 netbsd-6-0-RELEASE:1.8 netbsd-6-0-RC2:1.8 tls-maxphys:1.8.0.12 tls-maxphys-base:1.9 matt-nb6-plus:1.8.0.10 matt-nb6-plus-base:1.8 netbsd-6-0-RC1:1.8 yamt-pagecache-base5:1.8 yamt-pagecache-base4:1.8 netbsd-6:1.8.0.8 netbsd-6-base:1.8 netbsd-5-1-2-RELEASE:1.4 netbsd-5-1-1-RELEASE:1.4 yamt-pagecache-base3:1.8 yamt-pagecache-base2:1.8 yamt-pagecache:1.8.0.6 yamt-pagecache-base:1.8 cherry-xenmp:1.8.0.4 cherry-xenmp-base:1.8 bouyer-quota2-nbase:1.8 bouyer-quota2:1.8.0.2 bouyer-quota2-base:1.8 matt-mips64-premerge-20101231:1.8 matt-nb5-mips64-premerge-20101231:1.4 matt-nb5-pq3:1.4.0.42 matt-nb5-pq3-base:1.4 netbsd-5-1:1.4.0.40 netbsd-5-1-RELEASE:1.4 netbsd-5-1-RC4:1.4 matt-nb5-mips64-k15:1.4 netbsd-5-1-RC3:1.4 netbsd-5-1-RC2:1.4 netbsd-5-1-RC1:1.4 netbsd-5-0-2-RELEASE:1.4 matt-nb5-mips64-premerge-20091211:1.4 matt-premerge-20091211:1.8 matt-nb5-mips64-u2-k2-k4-k7-k8-k9:1.4 matt-nb4-mips64-k7-u2a-k9b:1.4 matt-nb5-mips64-u1-k1-k5:1.4 matt-nb5-mips64:1.4.0.38 netbsd-5-0-1-RELEASE:1.4 jym-xensuspend-nbase:1.6 netbsd-5-0:1.4.0.36 netbsd-5-0-RELEASE:1.4 netbsd-5-0-RC4:1.4 netbsd-5-0-RC3:1.4 netbsd-5-0-RC2:1.4 jym-xensuspend:1.6.0.2 jym-xensuspend-base:1.6 netbsd-5-0-RC1:1.4 mjf-devfs2-base2:1.6 netbsd-5:1.4.0.34 netbsd-5-base:1.4 matt-mips64-base2:1.4 matt-mips64:1.4.0.32 netbsd-4-0-1-RELEASE:1.4 wrstuden-revivesa-base-3:1.4 wrstuden-revivesa-base-2:1.4 wrstuden-fixsa-newbase:1.4 wrstuden-revivesa-base-1:1.4 yamt-pf42-base4:1.4 yamt-pf42-base3:1.4 hpcarm-cleanup-nbase:1.4 yamt-pf42-baseX:1.4 yamt-pf42-base2:1.4 wrstuden-revivesa:1.4.0.30 wrstuden-revivesa-base:1.4 yamt-pf42:1.4.0.28 yamt-pf42-base:1.4 mjf-devfs2:1.4.0.26 mjf-devfs2-base:1.4 keiichi-mipv6:1.4.0.24 keiichi-mipv6-base:1.4 mjf-devfs:1.4.0.22 mjf-devfs-base:1.4 matt-armv6-nbase:1.4 matt-armv6-prevmlocking:1.4 wrstuden-fixsa-base-1:1.4 netbsd-4-0:1.4.0.20 netbsd-4-0-RELEASE:1.4 cube-autoconf:1.4.0.18 cube-autoconf-base:1.4 netbsd-4-0-RC5:1.4 netbsd-4-0-RC4:1.4 netbsd-4-0-RC3:1.4 netbsd-4-0-RC2:1.4 netbsd-4-0-RC1:1.4 matt-armv6:1.4.0.16 matt-armv6-base:1.4 matt-mips64-base:1.4 hpcarm-cleanup:1.4.0.14 hpcarm-cleanup-base:1.4 netbsd-3-1-1-RELEASE:1.4 netbsd-3-0-3-RELEASE:1.4 wrstuden-fixsa:1.4.0.12 wrstuden-fixsa-base:1.4 abandoned-netbsd-4-base:1.4 abandoned-netbsd-4:1.4.0.6 netbsd-3-1:1.4.0.8 netbsd-3-1-RELEASE:1.4 netbsd-3-0-2-RELEASE:1.4 netbsd-3-1-RC4:1.4 netbsd-3-1-RC3:1.4 netbsd-3-1-RC2:1.4 netbsd-3-1-RC1:1.4 netbsd-4:1.4.0.10 netbsd-4-base:1.4 netbsd-3-0-1-RELEASE:1.4 netbsd-3-0:1.4.0.4 netbsd-3-0-RELEASE:1.4 netbsd-3-0-RC6:1.4 netbsd-3-0-RC5:1.4 netbsd-3-0-RC4:1.4 netbsd-3-0-RC3:1.4 netbsd-3-0-RC2:1.4 netbsd-3-0-RC1:1.4 netbsd-2-0-3-RELEASE:1.3 netbsd-2-1:1.3.0.12 netbsd-2-1-RELEASE:1.3 netbsd-2-1-RC6:1.3 netbsd-2-1-RC5:1.3 netbsd-2-1-RC4:1.3 netbsd-2-1-RC3:1.3 netbsd-2-1-RC2:1.3 netbsd-2-1-RC1:1.3 netbsd-2-0-2-RELEASE:1.3 netbsd-3:1.4.0.2 netbsd-3-base:1.4 netbsd-2-0-1-RELEASE:1.3 netbsd-2:1.3.0.10 netbsd-2-base:1.3 netbsd-2-0-RELEASE:1.3 netbsd-2-0-RC5:1.3 netbsd-2-0-RC4:1.3 netbsd-2-0-RC3:1.3 netbsd-2-0-RC2:1.3 netbsd-2-0-RC1:1.3 netbsd-2-0:1.3.0.8 netbsd-2-0-base:1.3 netbsd-1-6-PATCH002-RELEASE:1.3 netbsd-1-6-PATCH002:1.3 netbsd-1-6-PATCH002-RC4:1.3 netbsd-1-6-PATCH002-RC3:1.3 netbsd-1-6-PATCH002-RC2:1.3 netbsd-1-6-PATCH002-RC1:1.3 netbsd-1-6-PATCH001:1.3 netbsd-1-6-PATCH001-RELEASE:1.3 netbsd-1-6-PATCH001-RC3:1.3 netbsd-1-6-PATCH001-RC2:1.3 netbsd-1-6-PATCH001-RC1:1.3 fvdl_fs64_base:1.3 netbsd-1-6-RELEASE:1.3 netbsd-1-6-RC3:1.3 netbsd-1-6-RC2:1.3 netbsd-1-6-RC1:1.3 netbsd-1-6:1.3.0.6 netbsd-1-6-base:1.3 netbsd-1-5-PATCH003:1.3 netbsd-1-5-PATCH002:1.3 netbsd-1-5-PATCH001:1.3 netbsd-1-5-RELEASE:1.3 netbsd-1-5-BETA2:1.3 netbsd-1-5-BETA:1.3 netbsd-1-5-ALPHA2:1.3 netbsd-1-5:1.3.0.4 netbsd-1-5-base:1.3 minoura-xpg4dl:1.3.0.2 minoura-xpg4dl-base:1.3 rc-d-2000-03-10:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.15 date 2021.03.09.12.42.46; author sborrill; state Exp; branches; next 1.14; commitid i2sN0BORyDp7iDKC; 1.14 date 2021.02.16.10.02.42; author hannken; state Exp; branches; next 1.13; commitid I7J5otNZ2JUa5VHC; 1.13 date 2020.03.01.15.22.55; author roy; state Exp; branches; next 1.12; commitid baLRRitSLMlnaIYB; 1.12 date 2020.02.23.08.53.25; author riastradh; state Exp; branches; next 1.11; commitid SOk4QEby6Es2fMXB; 1.11 date 2019.09.15.19.38.09; author brad; state Exp; branches; next 1.10; commitid bByVmrilu0dLW8DB; 1.10 date 2018.06.08.14.44.21; author sevan; state Exp; branches 1.10.2.1 1.10.4.1; next 1.9; commitid fTmHajc2JcZXfuFA; 1.9 date 2014.07.22.17.11.09; author wiz; state Exp; branches 1.9.22.1; next 1.8; commitid suHlgoA0OoiICoJx; 1.8 date 2009.10.18.21.58.37; author haad; state Exp; branches 1.8.12.1 1.8.24.1; next 1.7; 1.7 date 2009.10.05.22.39.27; author haad; state Exp; branches; next 1.6; 1.6 date 2008.12.01.14.47.14; author tsutsui; state Exp; branches; next 1.5; 1.5 date 2008.11.12.12.35.52; author ad; state Exp; branches; next 1.4; 1.4 date 2004.08.13.18.08.03; author mycroft; state Exp; branches 1.4.26.1; next 1.3; 1.3 date 2000.05.13.08.45.07; author lukem; state Exp; branches; next 1.2; 1.2 date 2000.04.27.21.00.50; author veego; state Exp; branches; next 1.1; 1.1 date 2000.03.10.11.53.24; author lukem; state Exp; branches 1.1.1.1; next ; 1.10.2.1 date 2020.04.13.07.45.46; author martin; state Exp; branches; next ; commitid X01YhRUPVUDaec4C; 1.10.4.1 date 2019.09.27.09.18.37; author martin; state Exp; branches; next 1.10.4.2; commitid DpUTyCfKkivBaDEB; 1.10.4.2 date 2020.02.25.20.03.12; author martin; state Exp; branches; next 1.10.4.3; commitid fykfcXX7kubPS5YB; 1.10.4.3 date 2021.03.09.16.01.24; author martin; state Exp; branches; next ; commitid ofQ1PvW4PXAyoEKC; 1.9.22.1 date 2018.06.25.07.25.11; author pgoyette; state Exp; branches; next ; commitid 8PtAu9af7VvhiDHA; 1.8.12.1 date 2014.08.19.23.45.51; author tls; state Exp; branches; next ; commitid jTnpym9Qu0o4R1Nx; 1.8.24.1 date 2014.08.10.06.49.24; author tls; state Exp; branches; next ; commitid L6kRv2THETa8AMLx; 1.4.26.1 date 2009.01.17.20.43.44; author mjf; state Exp; branches; next ; 1.1.1.1 date 2000.03.10.11.53.24; author lukem; state Exp; branches; next ; desc @@ 1.15 log @Need to explicitly load value of zfs variable as zfs=YES may be set in /etc/rc.conf.d/zfs, not /etc/rc.conf. @ text @#!/bin/sh # # $NetBSD: mountall,v 1.14 2021/02/16 10:02:42 hannken Exp $ # # REQUIRE: mountcritremote named ypbind # PROVIDE: mountall $_rc_subr_loaded . /etc/rc.subr name="mountall" start_cmd="mountall_start" stop_cmd="mountall_stop" mountall_start() { echo 'Mounting all file systems...' # Mount ZFS filesystems first because fstab # may try and null mount paths on ZFS. if checkyesno zfs; then zfs mount -a zfs share -a fi # Mount file systems noted in fstab. mount -a } mountall_stop() { echo 'Unmounting all file systems...' # Unmount file systems noted in fstab. umount -a # Unmount ZFS file systems. if checkyesno zfs; then zfs unshare -a zfs unmount -a fi } load_rc_config $name load_rc_config_var zfs zfs run_rc_command "$1" @ 1.14 log @Enable "/etc/zfs/exports" from "zfs share" in rc.d/mountd and rc.d/mountall. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.13 2020/03/01 15:22:55 roy Exp $ d44 1 @ 1.13 log @mountall: Mount ZFS filesystems before fstab This allows null mounts in fstab to reference fstab mounts. It's highly unlikely ZFS mounts would reference anything outside of ZFS. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.12 2020/02/23 08:53:25 riastradh Exp $ d23 1 d38 1 @ 1.12 log @If zfs=YES, unconditioally do zfs mount/unmount -a. If you set zfs=YES, presumably you positively want the automatic rc.d actions, so if there's no /sbin/zfs or if zfs can't find pools with /etc/zfs/zpool.cache, presumably you would like feedback about that in rc.log. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.11 2019/09/15 19:38:09 brad Exp $ d18 3 a20 2 # Mount file systems noted in fstab. mount -a a21 1 # Mount ZFS file systems. d24 3 d32 4 a36 1 # Unmount ZFS file systems. a38 2 # Unmount file systems noted in fstab. umount -a @ 1.11 log @ Add support for legacy ZFS filesystems, specified by mountpoint=legacy in the ZFS properties of the dataset and a simple man page for mount_zfs. With this, it is possible to put ZFS filesystems in /etc/fstab as file system type zfs. Add a rc.d script that kicks the module ZFS load mostly before mountall runs simular to what LVM does. This allows for any legacy mounts to be specified in critical_local_filesystems and allows for ZFS pools on top of cgd (probably among other things). Introduce a rc.conf variable called zfs which needs to be set to YES, in the usual manor of things, to get zvols and ZFS dataset support rather then just assume that 'zfs mount' does that in mountall. Fix a problem in mountall if ZFS is not compiled into the system. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.10 2018/06/08 14:44:21 sevan Exp $ d20 1 a20 1 if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then d29 1 a29 1 if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then @ 1.10 log @Prior to ZFSv15, volinit was an undocumented command which could be used to populate /dev with zvol device nodes. Following on with the recent ZFS/DTrace update, this is no longer a valid option and causes the mountall script to barf zfs usage() following from unrecognized command 'volinit' error. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.9 2014/07/22 17:11:09 wiz Exp $ d18 3 a20 5 if [ -f /etc/zfs/zpool.cache ]; then # Get ZFS module loaded (and thereby, zvols created). zfs list > /dev/null 2>&1 # Mount file systems noted in fstab. mount -a a22 3 else # Mount file systems noted in fstab. mount -a d29 1 a29 1 if [ -f /etc/zfs/zpool.cache ]; then a31 7 # Unmount file systems noted in fstab. umount -a # Unload ZFS module, so disk devices are closed. modunload zfs else # Otherwise, just deal with fstab. umount -a d33 2 @ 1.10.2.1 log @Mostly merge changes from HEAD upto 20200411 @ text @d3 1 a3 1 # $NetBSD$ d18 6 a23 4 # Mount ZFS filesystems first because fstab # may try and null mount paths on ZFS. if checkyesno zfs; then d25 3 a28 3 # Mount file systems noted in fstab. mount -a d34 2 a35 5 # Unmount file systems noted in fstab. umount -a # Unmount ZFS file systems. if checkyesno zfs; then d37 7 @ 1.10.4.1 log @Pull up following revision(s) (requested by brad in ticket #250): external/cddl/osnet/sbin/zfs/mount_zfs.8: revision 1.2 external/cddl/osnet/sbin/zfs/mount_zfs.8: revision 1.3 external/cddl/osnet/sbin/zfs/mount_zfs.8: revision 1.4 external/cddl/osnet/sbin/zfs/mount_zfs.8: revision 1.5 distrib/sets/lists/man/mi: revision 1.1652 distrib/sets/lists/man/mi: revision 1.1653 distrib/sets/lists/etc/mi: revision 1.259 etc/rc.d/mountall: revision 1.11 external/cddl/osnet/sbin/zfs/Makefile: revision 1.5 external/cddl/osnet/dist/cmd/zfs/zfs_main.c: revision 1.7 etc/rc.d/Makefile: revision 1.105 distrib/sets/lists/base/mi: revision 1.1217 etc/rc.d/Makefile: revision 1.106 etc/rc.d/zfs: revision 1.1 etc/defaults/rc.conf: revision 1.152 external/cddl/osnet/sbin/zfs/mount_zfs.8: revision 1.1 Add support for legacy ZFS filesystems, specified by mountpoint=legacy in the ZFS properties of the dataset and a simple man page for mount_zfs. With this, it is possible to put ZFS filesystems in /etc/fstab as file system type zfs. Add a rc.d script that kicks the module ZFS load mostly before mountall runs simular to what LVM does. This allows for any legacy mounts to be specified in critical_local_filesystems and allows for ZFS pools on top of cgd (probably among other things). Introduce a rc.conf variable called zfs which needs to be set to YES, in the usual manor of things, to get zvols and ZFS dataset support rather then just assume that 'zfs mount' does that in mountall. Fix a problem in mountall if ZFS is not compiled into the system. mount_zfs.8: add xref to fstab(5) Use more markup. Include mount_zfs man pages only for MKZFS builds. Moved zfs out of MKX11 block. Fix build failure without X11. Add a copyright to the man page and a bit of history. Use Pa macro for path new sentence, new line @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.10 2018/06/08 14:44:21 sevan Exp $ d18 5 a22 3 # Mount file systems noted in fstab. mount -a if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then d25 3 d34 1 a34 1 if checkyesno zfs && [ -x /sbin/zfs -a -f /etc/zfs/zpool.cache ]; then d37 7 a44 2 # Unmount file systems noted in fstab. umount -a @ 1.10.4.2 log @Pull up following revision(s) (requested by riastradh in ticket #725): etc/rc.d/mountall: revision 1.12 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.59 external/cddl/osnet/sys/kern/misc.c: revision 1.8 external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c: revision 1.5 external/cddl/osnet/dist/uts/common/fs/zfs/spa_history.c: revision 1.6 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.60 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_vnops.c: revision 1.61 Define VOP_STRATEGY on zfs device nodes too. Fixes eternal hangs in attempts to do I/O on device nodes on zfs. XXX pullup Teach zfs spec nodes to VOP_BWRITE too. Fixes hang on writing to, e.g., ffs mounted on a device node that lives on zfs. XXX pullup Teach device nodes on zfs to handle fsync by calling spec_fsync too. If zfs=YES, unconditioally do zfs mount/unmount -a. If you set zfs=YES, presumably you positively want the automatic rc.d actions, so if there's no /sbin/zfs or if zfs can't find pools with /etc/zfs/zpool.cache, presumably you would like feedback about that in rc.log. Report the OS name and release appropriately for NetBSD. We are not OpenSolaris or uts! Mark previous #ifdef __NetBSD__, per request from hannken. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.10.4.1 2019/09/27 09:18:37 martin Exp $ d20 1 a20 1 if checkyesno zfs; then d29 1 a29 1 if checkyesno zfs; then @ 1.10.4.3 log @Pull up following revision(s) (requested by sborrill in ticket #1230): etc/rc.d/mountall: revision 1.15 Need to explicitly load value of zfs variable as zfs=YES may be set in /etc/rc.conf.d/zfs, not /etc/rc.conf. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.10.4.2 2020/02/25 20:03:12 martin Exp $ a37 1 load_rc_config_var zfs zfs @ 1.9 log @'file system' for consistency with documentation (instead of 'filesystem'). @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.8 2009/10/18 21:58:37 haad Exp $ a20 2 # Initialize zvols so they can be mounted zfs volinit @ 1.9.22.1 log @Sync with HEAD @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.10 2018/06/08 14:44:21 sevan Exp $ d21 2 @ 1.8 log @Add zfs volinit command, suggested by tnn@@ this will initialize all zvols defined in a system. So they can be mounted from fstab as regular block devices. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.7 2009/10/05 22:39:27 haad Exp $ d17 1 a17 1 echo 'Mounting all filesystems...' d35 1 a35 1 echo 'Unmounting all filesystems...' @ 1.8.12.1 log @Rebase to HEAD as of a few days ago. @ text @d3 1 a3 1 # $NetBSD$ d17 1 a17 1 echo 'Mounting all file systems...' d35 1 a35 1 echo 'Unmounting all file systems...' @ 1.8.24.1 log @Rebase. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.9 2014/07/22 17:11:09 wiz Exp $ d17 1 a17 1 echo 'Mounting all file systems...' d35 1 a35 1 echo 'Unmounting all file systems...' @ 1.7 log @Add support for mounting zfs filesystems to mountall script. ZFS configuration is stored in /etc/zpool.cache and it is automatically loaded to kernel from filesystem. Filesystems are then configured accordingly to their properties loaded from cache file. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.6 2008/12/01 14:47:14 tsutsui Exp $ d21 2 @ 1.6 log @/etc/rc.d/mountall should obviously REQUIRE mountcritremote, and may also REQUIRE named and ypbind for NFS hostname in fstab(5). @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.5 2008/11/12 12:35:52 ad Exp $ d12 34 a45 2 start_cmd="echo 'Mounting all filesystems...'; mount -a" stop_cmd="echo 'Unmounting all filesystems...'; umount -a" @ 1.5 log @Remove LKMs and switch to the module framework, pass 1. Proposed on tech-kern@@. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.4 2004/08/13 18:08:03 mycroft Exp $ d6 1 @ 1.4 log @Add an _rc_subr_loaded variable, set to ":" by rc.subr. Scripts can use this for a speedup by doing: $_rc_subr_loaded . /etc/rc.subr @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.3 2000/05/13 08:45:07 lukem Exp $ a6 1 # REQUIRE: beforemountlkm @ 1.4.26.1 log @Sync with HEAD. @ text @d3 1 a3 1 # $NetBSD$ a5 1 # REQUIRE: mountcritremote named ypbind d7 1 @ 1.3 log @Use load_rc_config() (from rc.subr) instead of sourcing /etc/rc.conf. This allows us or a user to change the configuration file method in one place - rc.subr - without having to edit all of the rc.d/* files. @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.2 2000/04/27 21:00:50 veego Exp $ d9 1 a9 1 . /etc/rc.subr @ 1.2 log @Use the stop_cmd to unmount the filesystems with 'umount -a'. This helps to fix the unclean reboots (at least on my system). @ text @d3 1 a3 1 # $NetBSD: mountall,v 1.1.1.1 2000/03/10 11:53:24 lukem Exp $ a9 1 . /etc/rc.conf d15 1 @ 1.1 log @Initial revision @ text @d3 1 a3 1 # $NetBSD$ d14 1 a14 1 stop_cmd=":" @ 1.1.1.1 log @rc.d scripts derived from /etc/rc @ text @@