Compare commits
	
		
			16 Commits
		
	
	
		
			openrc-0.1
			...
			funtoo-ope
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 52f593062a | ||
|   | 45209d7b95 | ||
|   | c9d06219c7 | ||
|   | 6e6cf26b99 | ||
|   | 58425a972c | ||
|   | b9204e97a1 | ||
|   | 2cd47b3b4d | ||
|   | f07d8154a9 | ||
|   | 173001713c | ||
|   | 875ee9529b | ||
|   | b3f70ca20b | ||
|   | de36b26d5e | ||
|   | ae7cbd910a | ||
|   | 92b274a7de | ||
|   | b3d47d5861 | ||
|   | f5ba232fb4 | 
| @@ -1,3 +1,3 @@ | ||||
| NAME=		openrc | ||||
| VERSION=	0.10.5 | ||||
| VERSION=	0.10 | ||||
| PKG=		${NAME}-${VERSION} | ||||
|   | ||||
| @@ -1,3 +1,3 @@ | ||||
| # Sets the level at which logging of messages is done to the | ||||
| # console.  See dmesg(1) for more info. | ||||
| # console.  See dmesg(8) for more info. | ||||
| dmesg_level="1" | ||||
|   | ||||
| @@ -552,34 +552,26 @@ | ||||
| # You can also configure the VLAN - see for ip man page for more details | ||||
| # To change the vlan interface name. If not set, the standard "iface.vlanid" | ||||
| # will be used. This is the replacement for the old 'vconfig set_name_type' | ||||
| # functionality. If you previously relied on the DEV_PLUS_VID or | ||||
| # DEV_PLUS_VID_NO_PAD options to have different VLANs with same ID value, on | ||||
| # different interfaces, please note that you need to use both the interface and | ||||
| # vlan number in the numbering. This applies for all of the options: name, | ||||
| # txqueuelen, mac, broadcast, mtu, ingress, egress, flags | ||||
| # functionality. | ||||
| #vlan1_name="vlan1" | ||||
| #eth0_vlan2_name="eth0.2" | ||||
| #eth1_vlan2_name="eth1.2" | ||||
| #vlan2_name="eth0.2" | ||||
|  | ||||
| # The following shows the old set_name_type setting and what new option to set: | ||||
| # Using eth9 & VLAN VID 26 as an example. | ||||
| # VLAN_PLUS_VID         vlan26_name="vlan0026" | ||||
| # VLAN_PLUS_VID_NO_PAD  vlan26_name="vlan26" | ||||
| # DEV_PLUS_VID          eth9_vlan26_name="eth9.0026" | ||||
| # DEV_PLUS_VID_NO_PAD   eth9_vlan26_name="eth9.26" | ||||
| # DEV_PLUS_VID          vlan26_name="eth9.0026" | ||||
| # DEV_PLUS_VID_NO_PAD   vlan26_name="eth9.26" | ||||
|  | ||||
| # Set the vlan flags | ||||
| #vlan1_flags="reorder_hdr off gvrp on loose_binding on" | ||||
| #eth0_vlan1_flags="reorder_hdr off gvrp on loose_binding on" | ||||
|  | ||||
| # Configure in/egress maps | ||||
| #vlan1_ingress="2:6 3:5" | ||||
| #eth0_vlan1_egress="1:2" | ||||
| #vlan1_egress="1:2" | ||||
|  | ||||
| #config_vlan1="172.16.2.1/24" | ||||
| #config_vlan2="172.16.3.1/24" | ||||
| #config_eth0_1="172.16.4.1/24" | ||||
| #config_eth1_1="172.16.5.1/24" | ||||
| #config_vlan1="172.16.3.1/23" | ||||
| #config_vlan2="172.16.2.1/23" | ||||
|  | ||||
| # NOTE: Vlans can be configured with a . in their interface names | ||||
| # When configuring vlans with this name type, you need to replace . with a _ | ||||
| @@ -1119,6 +1111,13 @@ | ||||
| # Hypothetical network card that requires a change-eeprom toggle to enable flashing | ||||
| #ethtool_order_eth0="change-eeprom flash change pause coalesce ring offload nfc rxfh-indir ntuple" | ||||
|  | ||||
| #----------------------------------------------------------------------------- | ||||
| # Firewalld support | ||||
| # If you are using the firewalld daemon to configure your firewall | ||||
| # settings and you have specific zones you want to apply to your | ||||
| # interfaces, you can do this here. | ||||
| #firewalld_zone_eth0="myzone" | ||||
|  | ||||
| ############################################################################## | ||||
| # ADVANCED CONFIGURATION | ||||
| # | ||||
|   | ||||
| @@ -5,12 +5,38 @@ | ||||
| description="Sets the hostname of the machine." | ||||
|  | ||||
| depend() { | ||||
| 	keyword -lxc | ||||
| 	need root | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	hostname=${hostname-${HOSTNAME-localhost}} | ||||
| 	out=$hostname | ||||
| 	short=${hostname%%.*} | ||||
| 	if [ "$short" != "$hostname" ]; then | ||||
| 		out="$out $short" | ||||
| 	fi | ||||
| 	if [ "$nisdomainname" != "" ]; then | ||||
| 		ebegin "Setting NIS domain name to $nisdomainname" | ||||
| 		nisdomainname $nisdomainname | ||||
| 		eend $? "Failed to set the NIS domain name" | ||||
| 	fi | ||||
| 	if [ "$short" != "localhost" ]; then | ||||
| 		out="$out localhost" | ||||
| 	fi | ||||
| 	if [ "$hostname" != "localhost.localdomain" ]; then | ||||
| 		out="$out localhost.localdomain" | ||||
| 	fi | ||||
| 	[ -n "$aliases" ] && out="$out $aliases" | ||||
| 	ebegin "Configuring /etc/hosts" | ||||
| 	[ -e /etc/hosts ] && sed -i -e '/[[:space:]]*127.0.0.1[[:space:]]/d' -e '/[[:space:]]*::1[[:space:]]/d' /etc/hosts | ||||
| 	cat <<END >> /etc/hosts | ||||
| 127.0.0.1	$out | ||||
| ::1		$out | ||||
| END | ||||
| 	chmod 0644 /etc/hosts | ||||
| 	eend $? | ||||
| 	[ "$RC_SYS" = "LXC" ] && return 0 | ||||
| 	ebegin "Setting hostname to $hostname" | ||||
| 	hostname "$hostname" | ||||
| 	eend $? "Failed to set the hostname" | ||||
|   | ||||
| @@ -9,7 +9,7 @@ depend() | ||||
| 	need fsck | ||||
| 	use lvm modules mtab | ||||
| 	after lvm modules | ||||
| 	keyword -jail -openvz -vserver -lxc | ||||
| 	keyword -jail -vserver -lxc | ||||
| } | ||||
|  | ||||
| start() | ||||
|   | ||||
| @@ -12,8 +12,6 @@ depend() | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	local ret=0 | ||||
|  | ||||
| 	# Flush all pending disk writes now | ||||
| 	sync; sync | ||||
|  | ||||
| @@ -41,9 +39,6 @@ start() | ||||
| 	do_unmount "umount -r" \ | ||||
| 		--skip-point-regex "$m" \ | ||||
| 		"${fs:+--skip-fstype-regex}" $fs --nonetdev | ||||
| 	ret=$? | ||||
|  | ||||
| 	eoutdent | ||||
|  | ||||
| 	eend $ret | ||||
| 	eend $? | ||||
| } | ||||
|   | ||||
| @@ -2,27 +2,62 @@ | ||||
| # Copyright (c) 2007-2009 Roy Marples <roy@marples.name> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| description="Mounts network shares, other than NFS, according to /etc/fstab." | ||||
| # We skip all NFS shares in this script because they require extra | ||||
| # daemons to be running on the client in order to work correctly. | ||||
| # It is best to allow nfs-utils to handle all nfs shares. | ||||
| description="Mounts network shares according to /etc/fstab." | ||||
|  | ||||
| need_portmap() | ||||
| { | ||||
| 	local opts= | ||||
| 	local IFS=" | ||||
| " | ||||
| 	set -- $(fstabinfo --options --fstype nfs,nfs4) | ||||
| 	for opts; do | ||||
| 		case ,$opts, in | ||||
| 			*,noauto,*|*,nolock,*);; | ||||
| 			*) return 0;; | ||||
| 		esac | ||||
| 	done | ||||
| 	return 1 | ||||
| } | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	# Only have portmap as a dependency if there is a nfs mount in fstab | ||||
| 	# that is set to mount at boot | ||||
| 	local pmap= | ||||
| 	if need_portmap; then | ||||
| 		pmap="rpc.statd" | ||||
| 		[ -x @SYSCONFDIR@/init.d/rpcbind ] \ | ||||
| 			&& pmap="$pmap rpcbind" \ | ||||
| 			|| pmap="$pmap portmap" | ||||
| 	fi | ||||
|  | ||||
| 	config /etc/fstab | ||||
| 	need net | ||||
| 	need net $pmap | ||||
| 	use afc-client amd autofs openvpn | ||||
| 	use dns | ||||
| 	use dns nfs nfsmount portmap rpcbind rpc.statd rpc.lockd | ||||
| 	keyword -jail -vserver | ||||
| } | ||||
|  | ||||
| start() | ||||
| { | ||||
| 	local myneed= myuse= pmap="portmap" nfsmounts= | ||||
| 	[ -x @SYSCONFDIR@/init.d/rpcbind ] && pmap="rpcbind" | ||||
|  | ||||
| 	local x= fs= rc= | ||||
| 	for x in $net_fs_list $extra_net_fs_list; do | ||||
| 		case "$x" in | ||||
| 			nfs|nfs4) | ||||
| 			continue | ||||
| 			# If the nfsmount script took care of the nfs | ||||
| 			# filesystems, then there's no point in trying | ||||
| 			# them twice | ||||
| 			service_started nfsmount && continue | ||||
|  | ||||
| 			# Only try to mount NFS filesystems if portmap was | ||||
| 			# started. This is to fix "hang" problems for new | ||||
| 			# users who do not add portmap to the default runlevel. | ||||
| 			if need_portmap && ! service_started "$pmap"; then | ||||
| 				continue | ||||
| 			fi | ||||
| 			;; | ||||
| 		esac | ||||
| 		fs="$fs${fs:+,}$x" | ||||
| @@ -47,14 +82,7 @@ stop() | ||||
| 	. "$RC_LIBEXECDIR"/sh/rc-mount.sh | ||||
|  | ||||
| 	for x in $net_fs_list $extra_net_fs_list; do | ||||
| 		case "$x" in | ||||
| 			nfs|nfs4) | ||||
| 				continue | ||||
| 				;; | ||||
| 			*) | ||||
| 				fs="$fs${fs:+,}$x" | ||||
| 				;; | ||||
| 		esac | ||||
| 		fs="$fs${fs:+,}$x" | ||||
| 	done | ||||
| 	if [ -n "$fs" ]; then | ||||
| 		umount -at $fs || eerror "Failed to simply unmount filesystems" | ||||
| @@ -63,14 +91,7 @@ stop() | ||||
| 	eindent | ||||
| 	fs= | ||||
| 	for x in $net_fs_list $extra_net_fs_list; do | ||||
| 		case "$x" in | ||||
| 			nfs|nfs4) | ||||
| 				continue | ||||
| 				;; | ||||
| 			*) | ||||
| 				fs="$fs${fs:+|}$x" | ||||
| 				;; | ||||
| 		esac | ||||
| 		fs="$fs${fs:+|}$x" | ||||
| 	done | ||||
| 	[ -n "$fs" ] && fs="^($fs)$" | ||||
| 	do_unmount umount ${fs:+--fstype-regex} $fs --netdev | ||||
|   | ||||
| @@ -12,10 +12,7 @@ depend() | ||||
| { | ||||
| 	need localmount | ||||
| 	after bootmisc | ||||
| 	provide lo | ||||
| 	if [ -n "$(interfaces)" ]; then | ||||
| 		provide net | ||||
| 	fi | ||||
| 	provide net | ||||
| 	keyword -jail -vserver | ||||
| } | ||||
|  | ||||
|   | ||||
| @@ -13,14 +13,6 @@ start() | ||||
| 			return 1 | ||||
| 		fi | ||||
| 	fi | ||||
| 	if ! checkpath -W "$RC_LIBEXECDIR"; then | ||||
| 		ewarn "WARNING: ${RC_LIBEXECDIR} is not writable!" | ||||
| 		if ! yesno "${RC_GOINGDOWN}"; then | ||||
| 			ewarn "Unable to save deptree cache" | ||||
| 			return 1 | ||||
| 		fi | ||||
| 		return 0 | ||||
| 	fi | ||||
| 	ebegin "Saving dependency cache" | ||||
| 	local rc= | ||||
| 	if [ ! -d "$RC_LIBEXECDIR"/cache ]; then | ||||
|   | ||||
| @@ -31,16 +31,14 @@ stop() | ||||
|  | ||||
| 	case "$RC_UNAME" in | ||||
| 		Linux) | ||||
| 			if [ -e /proc/swaps ]; then | ||||
| 				while read filename type rest; do | ||||
| 					case "$type" in | ||||
| 						file) swapoff $filename >/dev/null;; | ||||
| 					esac | ||||
| 					case "$filename" in | ||||
| 						/dev/loop*) swapoff $filename >/dev/null;; | ||||
| 					esac | ||||
| 				done < /proc/swaps | ||||
| 			fi | ||||
| 			while read filename type rest; do | ||||
| 				case "$type" in | ||||
| 					file) swapoff $filename >/dev/null;; | ||||
| 				esac | ||||
| 				case "$filename" in | ||||
| 					/dev/loop*) swapoff $filename >/dev/null;; | ||||
| 				esac | ||||
| 			done < /proc/swaps | ||||
| 			;; | ||||
| 	esac | ||||
| 	eend 0 | ||||
|   | ||||
| @@ -15,6 +15,14 @@ start() | ||||
| 	ebegin "Configuring kernel parameters" | ||||
| 	eindent | ||||
|  | ||||
| 	# default sysctl System V max shared memory to 1/4 of RAM: | ||||
| 	mem_bytes=`awk '/MemTotal:/ { printf "%0.f",$2 * 1024}' /proc/meminfo` | ||||
| 	mem_max=`expr $mem_bytes / 4`  | ||||
| 	page_size=`getconf PAGE_SIZE` | ||||
| 	shmall=`expr $mem_bytes / $page_size` | ||||
| 	sysctl kernel.shmmax=$mem_max > /dev/null | ||||
| 	sysctl kernel.shmall=$shmall > /dev/null | ||||
|  | ||||
| 	for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do | ||||
| 		if [ -r "$conf" ]; then | ||||
| 			vebegin "applying $conf" | ||||
|   | ||||
| @@ -1,5 +1,10 @@ | ||||
| ifeq (${MKTERMCAP},ncurses) | ||||
| 	LTERMCAP:=	$(shell pkg-config ncurses --libs 2> /dev/null) | ||||
| ifeq ($(LTERMCAP),) | ||||
| LIBTERMCAP?=	-lncurses | ||||
| else | ||||
| LIBTERMCAP?= $(LTERMCAP) | ||||
| endif | ||||
| CPPFLAGS+=	-DHAVE_TERMCAP | ||||
| LDADD+=		${LIBTERMCAP} | ||||
| else ifeq (${MKTERMCAP},termcap) | ||||
|   | ||||
| @@ -13,7 +13,7 @@ SRCS-Linux=	iwconfig.sh.in | ||||
| INC-Linux=	adsl.sh apipa.sh arping.sh bonding.sh br2684ctl.sh bridge.sh \ | ||||
| 		ccwgroup.sh clip.sh ethtool.sh iproute2.sh ifplugd.sh ip6to4.sh \ | ||||
| 		ipppd.sh iwconfig.sh netplugd.sh pppd.sh pump.sh tuntap.sh udhcpc.sh \ | ||||
| 		vlan.sh macvlan.sh ip6rd.sh | ||||
| 		vlan.sh macvlan.sh ip6rd.sh firewalld.sh | ||||
|  | ||||
| SRCS-NetBSD= | ||||
| INC-NetBSD=	ifwatchd.sh | ||||
|   | ||||
							
								
								
									
										38
									
								
								net/firewalld.sh
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										38
									
								
								net/firewalld.sh
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,38 @@ | ||||
| # Copyright (c) 2012 Doug Goldstein <cardoe@cardoe.com> | ||||
| # Released under the 2-clause BSD license. | ||||
|  | ||||
| firewalld_depend() | ||||
| { | ||||
| 	after interface | ||||
| 	before dhcp | ||||
| 	program firewall-cmd | ||||
| 	[ "$IFACE" != "lo" ] && need firewalld | ||||
| } | ||||
|  | ||||
| _config_vars="$_config_vars firewalld_zone" | ||||
|  | ||||
| firewalld_post_start() | ||||
| { | ||||
| 	local firewalld_zone= | ||||
| 	eval firewalld_zone=\$firewalld_zone_${IFVAR} | ||||
|  | ||||
| 	_exists || return 0 | ||||
|  | ||||
| 	if [ "${IFACE}" != "lo" ]; then | ||||
| 		firewall-cmd --zone="${firewalld_zone}" \ | ||||
| 			--change-interface="${IFACE}" > /dev/null 2>&1 | ||||
| 	fi | ||||
|  | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| firewalld_pre_stop() | ||||
| { | ||||
| 	_exists || return 0 | ||||
|  | ||||
| 	if [ "${IFACE}" != "lo" ]; then | ||||
| 		firewall-cmd --remove-interface="${IFACE}" > /dev/null 2>&1 | ||||
| 	fi | ||||
|  | ||||
| 	return 0 | ||||
| } | ||||
| @@ -212,7 +212,7 @@ _delete_addresses() | ||||
|  | ||||
| _has_carrier() | ||||
| { | ||||
| 	LC_ALL=C ip link show dev "${IFACE}" | grep -q "LOWER_UP" | ||||
| 	return 0 | ||||
| } | ||||
|  | ||||
| _tunnel() | ||||
| @@ -287,7 +287,7 @@ iproute2_pre_start() | ||||
| _iproute2_ipv6_tentative() | ||||
| { | ||||
| 	# Only check tentative when we have a carrier. | ||||
| 	_has_carrier || return 1 | ||||
| 	LC_ALL=C ip link show dev "${IFACE}" | grep -q "NO-CARRIER" && return 1 | ||||
| 	LC_ALL=C ip addr show dev "${IFACE}" | \ | ||||
| 		grep -q "^[[:space:]]*inet6 .* tentative" | ||||
| } | ||||
|   | ||||
| @@ -61,7 +61,7 @@ udhcpc_start() | ||||
| 	esac | ||||
|  | ||||
| 	case " ${args} " in | ||||
| 		*" --hostname="*|*" -h "*|*" -H "*);; | ||||
| 		*" --hosname="*|*" -h "*|*" -H "*);; | ||||
| 		*) | ||||
| 			if ${sendhost}; then | ||||
| 				local hname="$(hostname)" | ||||
|   | ||||
							
								
								
									
										31
									
								
								net/vlan.sh
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								net/vlan.sh
									
									
									
									
									
								
							| @@ -66,41 +66,26 @@ vlan_post_start() | ||||
| 		einfo "Adding VLAN ${vlan} to ${IFACE}" | ||||
| 		# We need to gather all interface configuration options | ||||
| 		# 1) naming. Default to the standard "${IFACE}.${vlan}" but it can be anything | ||||
| 		eval vname=\$${IFACE}_vlan${vlan}_name | ||||
| 		[ -z "${vname}" ] && eval vname=\$vlan${vlan}_name | ||||
| 		eval vname=\$vlan${vlan}_name | ||||
| 		[ -z "${vname}" ] && vname="${IFACE}.${vlan}" | ||||
| 		# 2) flags | ||||
| 		eval vflags=\$${IFACE}_vlan${vlan}_flags | ||||
| 		[ -z "${vname}" ] && eval vflags=\$vlan${vlan}_flags | ||||
| 		eval vflags=\$vlan${vlan}_flags | ||||
| 		# 3) ingress/egress map | ||||
| 		eval vingress=\$${IFACE}_vlan${vlan}_ingress | ||||
| 		[ -z "${vingress}" ] && eval vingress=\$vlan${vlan}_ingress | ||||
| 		eval vingress=\$vlan${vlan}_ingress | ||||
| 		[ -z "${vingress}" ] || vingress="ingress-qos-map ${vingress}" | ||||
| 		eval vegress=\$${IFACE}_vlan${vlan}_egress | ||||
| 		[ -z "${vegress}" ] && eval vegress=\$vlan${vlan}_egress | ||||
| 		eval vegress=\$vlan${vlan}_egress | ||||
| 		[ -z "${vegress}" ] || vegress="egress-qos-map ${vegress}" | ||||
|  | ||||
| 		# txqueue | ||||
| 		local txqueuelen= | ||||
| 		eval txqueuelen=\$txqueuelen_${IFACE}_vlan${vlan} | ||||
| 		[ -z "${txqueuelen}" ] && eval txqueuelen=\$txqueuelen_vlan${vlan} | ||||
| 		# mac | ||||
| 		eval txqueuelen=\$txqueuelen_vlan${vlan} | ||||
| 		local mac= | ||||
| 		eval mac=\$mac_${IFACE}_vlan${vlan} | ||||
| 		[ -z "${mac}" ] && eval mac=\$mac_vlan${vlan} | ||||
| 		# broadcast | ||||
| 		eval mac=\$mac_vlan${vlan} | ||||
| 		local broadcast= | ||||
| 		eval broadcast=\$broadcast_${IFACE}_vlan${vlan} | ||||
| 		[ -z "${broadcast}" ] && eval broadcast=\$broadcast_vlan${vlan} | ||||
| 		# mtu | ||||
| 		eval broadcast=\$broadcast_vlan${vlan} | ||||
| 		local mtu= | ||||
| 		eval mtu=\$mtu_${IFACE}_vlan${vlan} | ||||
| 		[ -z "${mtu}" ] && eval mtu=\$mtu_vlan${vlan} | ||||
|  | ||||
| 		# combine it all | ||||
| 		eval mtu=\$mtu_vlan${vlan} | ||||
| 		local opts="${txqueuelen:+txqueuelen} ${txqueuelen} ${mac:+address} ${mac} ${broadcast:+broadcast} ${broadcast} ${mtu:+mtu} ${mtu}" | ||||
|  | ||||
| 		veinfo "ip link add link \"${IFACE}\" name \"${vname}\" ${opts} type vlan id \"${vlan}\" ${vflags} ${vingress} ${vegress}" | ||||
| 		e="$(ip link add link "${IFACE}" name "${vname}" ${opts} type vlan id "${vlan}" ${vflags} ${vingress} ${vegress} 2>&1 1>/dev/null)" | ||||
| 		if [ -n "${e}" ]; then | ||||
| 			eend 1 "${e}" | ||||
|   | ||||
| @@ -37,23 +37,14 @@ fi | ||||
|  | ||||
| # /run is a new directory for storing volatile runtime data. | ||||
| # Read more about /run at https://lwn.net/Articles/436012 | ||||
| sys="$(rc --sys)" | ||||
|  | ||||
| if [ ! -d /run ]; then | ||||
| 	if [ "$sys" = VSERVER ]; then | ||||
| 		if [ -e /run ]; then | ||||
| 		rm -rf /run | ||||
| 		fi | ||||
| 		mkdir /run | ||||
| 	else | ||||
| 		eerror "The /run directory does not exist. Unable to continue." | ||||
| 		return 1 | ||||
| 	fi | ||||
| 	eerror "The /run directory does not exist. Unable to continue." | ||||
| 	return 1 | ||||
| fi | ||||
|  | ||||
| if [ "$sys" = VSERVER ]; then | ||||
| 	rm -rf /run/* | ||||
| elif ! mountinfo -q /run; then | ||||
| if mountinfo -q /run; then | ||||
| 	einfo "/run is already mounted, skipping" | ||||
| else | ||||
| 	ebegin "Mounting /run" | ||||
| 	rc=0 | ||||
| 	if ! fstabinfo --mount /run; then | ||||
|   | ||||
| @@ -268,10 +268,10 @@ for FILE in $tmpfiles_d ; do | ||||
| 		age=$6 | ||||
| 		arg=$7 | ||||
|  | ||||
| 		[ "${4}" = '-' -o "${4}" = '' ] && uid=0 | ||||
| 		[ "${5}" = '-' -o "${5}" = '' ] && gid=0 | ||||
| 		[ "${6}" = '-' -o "${6}" = '' ] && age=0 | ||||
| 		[ "${7}" = '-' -o "${7}" = '' ] && arg='' | ||||
| 		[ ${4} = '-' ] && uid=0 | ||||
| 		[ ${5} = '-' ] && gid=0 | ||||
| 		[ ${6} = '-' ] && age=0 | ||||
| 		[ ${7} = '-' ] && arg='' | ||||
| 		set -- "$path" "$mode" "$uid" "$gid" "$age" "$arg" | ||||
|  | ||||
| 		[ "$VERBOSE" -eq "1" ] && echo _$cmd "$@" | ||||
|   | ||||
| @@ -393,7 +393,8 @@ mountinfo(int argc, char **argv) | ||||
| 	bool quiet; | ||||
| 	char *this_path; | ||||
|  | ||||
| 	quiet = rc_yesno(getenv("EINFO_QUIET")); | ||||
| 	/* Ensure that we are only quiet when explicitly told to be */ | ||||
| 	unsetenv("EINFO_QUIET"); | ||||
|  | ||||
| #define DO_REG(_var)							      \ | ||||
| 	if (_var) free(_var);						      \ | ||||
| @@ -474,6 +475,7 @@ mountinfo(int argc, char **argv) | ||||
| 	REG_FREE(args.skip_options_regex); | ||||
|  | ||||
| 	result = EXIT_FAILURE; | ||||
| 	quiet = rc_yesno(getenv("EINFO_QUIET")); | ||||
|  | ||||
| 	/* We should report the mounts in reverse order to ease unmounting */ | ||||
| 	TAILQ_FOREACH_REVERSE(s, nodes, rc_stringlist, entries) { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user