Deleted Added
full compact
zfs (180563) zfs (195938)
1#!/bin/sh
2#
1#!/bin/sh
2#
3# $FreeBSD: head/etc/rc.d/zfs 180563 2008-07-16 19:22:48Z dougb $
3# $FreeBSD: head/etc/rc.d/zfs 195938 2009-07-29 05:23:52Z pjd $
4#
5
6# PROVIDE: zfs
7# REQUIRE: mountcritlocal
8
9. /etc/rc.subr
10
11name="zfs"

--- 6 unchanged lines hidden (view full) ---

18{
19 if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
20 zfs mount -a
21 fi
22}
23
24zfs_start_main()
25{
4#
5
6# PROVIDE: zfs
7# REQUIRE: mountcritlocal
8
9. /etc/rc.subr
10
11name="zfs"

--- 6 unchanged lines hidden (view full) ---

18{
19 if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
20 zfs mount -a
21 fi
22}
23
24zfs_start_main()
25{
26 zfs volinit
27 zfs mount -a
28 zfs share -a
29 if [ ! -r /etc/zfs/exports ]; then
30 touch /etc/zfs/exports
31 fi
26 zfs mount -a
27 zfs share -a
28 if [ ! -r /etc/zfs/exports ]; then
29 touch /etc/zfs/exports
30 fi
32 # Enable swap on ZVOLs with property org.freebsd:swap=on.
33 zfs list -H -o org.freebsd:swap,name -t volume | \
34 while read state name; do
35 case "${state}" in
36 [oO][nN])
37 swapon /dev/zvol/${name}
38 ;;
39 esac
40 done
41}
42
43zfs_start()
44{
45 if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
46 zfs_start_jail
47 else
48 zfs_start_main

--- 4 unchanged lines hidden (view full) ---

53{
54 if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
55 zfs unmount -a
56 fi
57}
58
59zfs_stop_main()
60{
31}
32
33zfs_start()
34{
35 if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
36 zfs_start_jail
37 else
38 zfs_start_main

--- 4 unchanged lines hidden (view full) ---

43{
44 if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
45 zfs unmount -a
46 fi
47}
48
49zfs_stop_main()
50{
61 # Disable swap on ZVOLs with property org.freebsd:swap=on.
62 zfs list -H -o org.freebsd:swap,name -t volume | \
63 while read state name; do
64 case "${state}" in
65 [oO][nN])
66 swapoff /dev/zvol/${name}
67 ;;
68 esac
69 done
70 zfs unshare -a
71 zfs unmount -a
51 zfs unshare -a
52 zfs unmount -a
72 zfs volfini
73}
74
75zfs_stop()
76{
77 if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
78 zfs_stop_jail
79 else
80 zfs_stop_main
81 fi
82}
83
84load_rc_config $name
85run_rc_command "$1"
53}
54
55zfs_stop()
56{
57 if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
58 zfs_stop_jail
59 else
60 zfs_stop_main
61 fi
62}
63
64load_rc_config $name
65run_rc_command "$1"