Index: head/libexec/rc/rc.d/Makefile =================================================================== --- head/libexec/rc/rc.d/Makefile (revision 364816) +++ head/libexec/rc/rc.d/Makefile (revision 364817) @@ -1,328 +1,329 @@ # $FreeBSD$ .include CONFDIR= /etc/rc.d CONFGROUPS= CONFS CONFSPACKAGE= rc CONFS= DAEMON \ FILESYSTEMS \ LOGIN \ NETWORKING \ SERVERS \ addswap \ adjkerntz \ archdep \ bgfsck \ ${_blacklistd} \ bridge \ cfumass \ cleanvar \ cleartmp \ cron \ ctld \ ddb \ defaultroute \ devd \ devfs \ devmatch \ dhclient \ dmesg \ dumpon \ fsck \ gbde \ geli \ geli2 \ gptboot \ growfs \ gssd \ hostid \ hostid_save \ hostname \ iovctl \ ip6addrctl \ ipsec \ ${_kadmind} \ ${_kdc} \ ${_kfd} \ kld \ kldxref \ ${_kpasswdd} \ ldconfig \ linux \ local \ localpkg \ lockd \ mixer \ motd \ mountcritlocal \ mountcritremote \ mountlate \ mdconfig \ mdconfig2 \ mountd \ msgs \ natd \ netif \ netoptions \ netwait \ newsyslog \ nfsclient \ nfscbd \ nfsd \ nfsuserd \ nisdomain \ ${_nscd} \ ntpdate \ ${_opensm} \ os-release \ pf \ pflog \ pfsync \ ppp \ pppoed \ pwcheck \ quota \ random \ rarpd \ rctl \ resolv \ root \ route6d \ routing \ rpcbind \ rtadvd \ rtsold \ rwho \ savecore \ securelevel \ serial \ sppp \ statd \ static_arp \ static_ndp \ stf \ swap \ swaplate \ sysctl \ syslogd \ sysvipc \ tmp \ ugidfw \ ${_utx} \ var \ watchdogd .if ${MK_NIS} != "no" CONFS+= ypbind \ ypldap \ yppasswdd \ ypserv \ ypset \ ypupdated \ ypxfrd .endif .if ${MK_ACCT} != "no" CONFGROUPS+= ACCT ACCT+= accounting ACCTPACKAGE= acct .endif .if ${MK_ACPI} != "no" CONFGROUPS+= ACPI ACPI= power_profile ACPIPACKAGE= acpi .endif .if ${MK_ACPI} != "no" || ${MK_APM} != "no" CONFS+= powerd .endif .if ${MK_APM} != "no" CONFGROUPS+= APM APM+= apm .if ${MACHINE} == "i386" APM+= apmd .endif APMPACKAGE= apm .endif .if ${MK_AUDIT} != "no" CONFGROUPS+= AUDIT AUDIT+= auditd AUDIT+= auditdistd .endif .if ${MK_AUTOFS} != "no" CONFS+= automount CONFS+= automountd CONFS+= autounmountd .endif .if ${MK_BLACKLIST} != "no" _blacklistd+= blacklistd .endif .if ${MK_BLUETOOTH} != "no" CONFGROUPS+= BLUETOOTH BLUETOOTH+= bluetooth \ bthidd \ hcsecd \ rfcomm_pppd_server \ sdpd \ ubthidhci BLUETOOTHPACKAGE= bluetooth .endif .if ${MK_BOOTPARAMD} != "no" CONFS+= bootparams .endif .if ${MK_BSNMP} != "no" CONFGROUPS+= BSNMP BSNMP+= bsnmpd BSNMPPACKAGE= bsnmp .endif .if ${MK_CCD} != "no" CONFS+= ccd .endif .if ${MK_FTP} != "no" CONFS+= ftpd .endif .if ${MK_HAST} != "no" CONFGROUPS+= HAST HAST= hastd HASTPACKAGE= hast .endif .if ${MK_INETD} != "no" CONFS+= inetd .endif .if ${MK_IPFILTER} != "no" CONFS+= ipfilter \ ipfs \ ipmon \ ipnat \ ippool .endif .if ${MK_IPFW} != "no" CONFS+= ipfw .if ${MK_NETGRAPH} != "no" CONFS+= ipfw_netflow .endif .endif .if ${MK_ISCSI} != "no" CONFS+= iscsictl CONFS+= iscsid .endif .if ${MK_JAIL} != "no" CONFGROUPS+= JAIL JAIL+= jail JAILPACKAGE= jail .endif .if ${MK_LEGACY_CONSOLE} != "no" CONFS+= moused CONFS+= syscons .endif .if ${MK_LPR} != "no" CONFS+= lpd .endif .if ${MK_KERBEROS} != "no" CONFS+= ipropd_master CONFS+= ipropd_slave _kadmind= kadmind _kdc= kdc _kfd= kfd _kpasswdd= kpasswdd DIRS+= VAR_HEMIDAL VAR_HEMIDAL= /var/heimdal VAR_HEMIDAL_MODE= 700 .endif .if ${MK_MAIL} != "no" CONFS+= othermta .endif .if ${MK_NS_CACHING} != "no" _nscd= nscd .endif .if ${MK_NTP} != "no" CONFS+= ntpd .endif .if ${MK_OFED} != "no" _opensm= opensm .endif .if ${MK_OPENSSL} != "no" CONFS+= keyserv .endif .if ${MK_OPENSSH} != "no" CONFGROUPS+= SSH SSH= sshd SSHPACKAGE= ssh .endif .if ${MK_PF} != "no" CONFS+= ftp-proxy .endif .if ${MK_ROUTED} != "no" CONFS+= routed .endif .if ${MK_SENDMAIL} != "no" CONFGROUPS+= SMRCD SMRCD= sendmail SMRCDPACKAGE= sendmail .endif .if ${MK_UNBOUND} != "no" CONFGROUPS+= UNBOUND UNBOUND+= local_unbound UNBOUNDPACKAGE= unbound .endif .if ${MK_UTMPX} != "no" _utx= utx .endif .if ${MK_VI} != "no" CONFGROUPS+= VI VI+= virecover VIPACKAGE= vi .endif .if ${MK_WIRELESS} != "no" CONFS+= hostapd CONFS+= wpa_supplicant .endif .if ${MK_ZFS} != "no" CONFGROUPS+= ZFS ZFS+= zfs ZFS+= zfsbe ZFS+= zfsd +ZFS+= zpool ZFS+= zvol .endif .for fg in ${CONFGROUPS} ${fg}MODE?= ${BINMODE} .endfor .include Index: head/libexec/rc/rc.d/mountcritlocal =================================================================== --- head/libexec/rc/rc.d/mountcritlocal (revision 364816) +++ head/libexec/rc/rc.d/mountcritlocal (revision 364817) @@ -1,64 +1,64 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: mountcritlocal -# REQUIRE: root hostid_save mdconfig +# REQUIRE: root hostid_save mdconfig zvol # KEYWORD: nojail shutdown . /etc/rc.subr name="mountcritlocal" desc="Mount critical local filesystems" start_cmd="mountcritlocal_start" stop_cmd=sync mountcritlocal_start() { local err holders waited # Set up the list of network filesystem types for which mounting # should be delayed until after network initialization. case ${extra_netfs_types} in [Nn][Oo]) ;; *) netfs_types="${netfs_types} ${extra_netfs_types}" ;; esac # Mount everything except nfs filesystems. check_startmsgs && echo -n 'Mounting local filesystems:' mount_excludes='no' for i in ${netfs_types}; do fstype=${i%:*} mount_excludes="${mount_excludes}${fstype}," done mount_excludes=${mount_excludes%,} mount -a -t ${mount_excludes} err=$? if [ ${err} -ne 0 ]; then echo 'Mounting /etc/fstab filesystems failed,' \ 'will retry after root mount hold release' root_hold_wait mount -a -t ${mount_excludes} err=$? fi check_startmsgs && echo '.' case ${err} in 0) ;; *) echo 'Mounting /etc/fstab filesystems failed,' \ 'startup aborted' stop_boot true ;; esac } load_rc_config $name run_rc_command "$1" Index: head/libexec/rc/rc.d/zfs =================================================================== --- head/libexec/rc/rc.d/zfs (revision 364816) +++ head/libexec/rc/rc.d/zfs (revision 364817) @@ -1,74 +1,67 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: zfs # REQUIRE: zfsbe # BEFORE: FILESYSTEMS var . /etc/rc.subr name="zfs" desc="Mount and share ZFS datasets" rcvar="zfs_enable" start_cmd="zfs_start" stop_cmd="zfs_stop" required_modules="zfs" zfs_start_jail() { if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then zfs mount -a fi } zfs_start_main() { - local cachefile - - for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do - if [ -r $cachefile ]; then - zpool import -c $cachefile -a - fi - done zfs mount -va zfs share -a if [ ! -r /etc/zfs/exports ]; then touch /etc/zfs/exports fi } zfs_start() { if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then zfs_start_jail else zfs_start_main fi } zfs_stop_jail() { if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then zfs unmount -a fi } zfs_stop_main() { zfs unshare -a zfs unmount -a } zfs_stop() { if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then zfs_stop_jail else zfs_stop_main fi } load_rc_config $name run_rc_command "$1" Index: head/libexec/rc/rc.d/zpool =================================================================== --- head/libexec/rc/rc.d/zpool (nonexistent) +++ head/libexec/rc/rc.d/zpool (revision 364817) @@ -0,0 +1,31 @@ +#!/bin/sh +# +# $FreeBSD$ +# + +# PROVIDE: zpool +# REQUIRE: hostid +# BEFORE: zvol mountcritlocal +# KEYWORD: nojail + +. /etc/rc.subr + +name="zpool" +desc="Import ZPOOLs" +rcvar="zfs_enable" +start_cmd="zpool_start" +required_modules="zfs" + +zpool_start() +{ + local cachefile + + for cachefile in /boot/zfs/zpool.cache /etc/zfs/zpool.cache; do + if [ -r $cachefile ]; then + zpool import -c $cachefile -a -N + fi + done +} + +load_rc_config $name +run_rc_command "$1" Property changes on: head/libexec/rc/rc.d/zpool ___________________________________________________________________ Added: svn:executable ## -0,0 +1 ## +* \ No newline at end of property Added: svn:keywords ## -0,0 +1 ## +FreeBSD=%H \ No newline at end of property Index: head/libexec/rc/rc.d/zvol =================================================================== --- head/libexec/rc/rc.d/zvol (revision 364816) +++ head/libexec/rc/rc.d/zvol (revision 364817) @@ -1,47 +1,47 @@ #!/bin/sh # # $FreeBSD$ # # PROVIDE: zvol -# REQUIRE: hostid +# REQUIRE: zpool # BEFORE: dumpon # KEYWORD: nojail . /etc/rc.subr name="zvol" desc="Activate swap on ZVOLs" rcvar="zfs_enable" start_cmd="zvol_start" stop_cmd="zvol_stop" required_modules="zfs" zvol_start() { # Enable swap on ZVOLs with property org.freebsd:swap=on. zfs list -H -o org.freebsd:swap,name -t volume | while read state name; do case "${state}" in ([oO][nN]) swapon /dev/zvol/${name} ;; esac done } zvol_stop() { # Disable swap on ZVOLs with property org.freebsd:swap=on. zfs list -H -o org.freebsd:swap,name -t volume | while read state name; do case "${state}" in ([oO][nN]) swapoff /dev/zvol/${name} ;; esac done } load_rc_config $name run_rc_command "$1"