403Webshell
Server IP : 82.208.35.60  /  Your IP : 216.73.216.89
Web Server : Apache/2.4.55 (FreeBSD) OpenSSL/1.1.1q-freebsd PHP/7.3.31
System : FreeBSD server7.d2m.cz 12.4-RELEASE-p9 FreeBSD 12.4-RELEASE-p9 GENERIC amd64
User : studiokobylisy_cz ( 1008)
PHP Version : 7.3.31
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /etc/rc.d/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /etc/rc.d/zfsbe
#!/bin/sh
#
# $FreeBSD: releng/12.4/libexec/rc/rc.d/zfsbe 307182 2016-10-13 06:19:54Z avg $
#

# PROVIDE: zfsbe
# REQUIRE: mountcritlocal

# Handle boot environment subordinate filesystems
# that may have canmount property set to noauto.
# For these filesystems mountpoint relative to /
# must be the same as their dataset name relative
# to BE root dataset.

. /etc/rc.subr

name="zfsbe"
rcvar="zfs_enable"
start_cmd="be_start"
stop_cmd="be_stop"
required_modules="zfs"

mount_subordinate()
{
	local _be

	_be=$1
	zfs list -rH -o mountpoint,name,canmount,mounted -s mountpoint -t filesystem $_be | \
	while read _mp _name _canmount _mounted ; do
		# skip filesystems that must not be mounted
		[ "$_canmount" = "off" ] && continue
		# skip filesystems that are already mounted
		[ "$_mounted" = "yes" ] && continue
		case "$_mp" in
		"none" | "legacy" | "/" | "/$_be")
			# do nothing for filesystems with unset or legacy mountpoint
			# or those that would be mounted over /
			;;
		"/$_be/"*)
			# filesystems with mountpoint relative to BE
			mount -t zfs $_name ${_mp#/$_be}
			;;
		*)
			# filesystems with mountpoint elsewhere
			zfs mount $_name
			;;
		esac
	done
}

be_start()
{
	if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then
		:
	else
		mount -p | while read _dev _mp _type _rest; do
			[ $_mp  = "/" ] || continue
			if [ $_type = "zfs" ] ; then
				mount_subordinate $_dev
			fi
			break
		done
	fi
}

be_stop()
{
}

load_rc_config $name
run_rc_command "$1"

Youez - 2016 - github.com/yon3zu
LinuXploit