NetBSD/etc/rc.d/mountall

39 lines
649 B
Plaintext
Raw Normal View History

2000-03-10 14:53:23 +03:00
#!/bin/sh
#
# $NetBSD: mountall,v 1.10.4.2 2020/02/25 20:03:12 martin Exp $
2000-03-10 14:53:23 +03:00
#
# REQUIRE: mountcritremote named ypbind
2000-03-10 14:53:23 +03:00
# PROVIDE: mountall
$_rc_subr_loaded . /etc/rc.subr
2000-03-10 14:53:23 +03:00
name="mountall"
start_cmd="mountall_start"
stop_cmd="mountall_stop"
mountall_start()
{
echo 'Mounting all file systems...'
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
2019-09-27 12:18:37 +03:00
# Mount file systems noted in fstab.
mount -a
if checkyesno zfs; then
# Mount ZFS file systems.
zfs mount -a
fi
}
mountall_stop()
{
echo 'Unmounting all file systems...'
if checkyesno zfs; then
# Unmount ZFS file systems.
zfs unmount -a
fi
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
2019-09-27 12:18:37 +03:00
# Unmount file systems noted in fstab.
umount -a
}
2000-03-10 14:53:23 +03:00
load_rc_config $name
2000-03-10 14:53:23 +03:00
run_rc_command "$1"