Compare commits
	
		
			34 Commits
		
	
	
		
			openrc-0.6
			...
			openrc-0.6
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 9285cb3392 | ||
|   | 6d9137d6c4 | ||
|   | 2fa6bb0d48 | ||
|   | 39776d6fb7 | ||
|   | 68c021c424 | ||
|   | 09bed967bf | ||
|   | 060b19e3e3 | ||
|   | d8a76d1bf6 | ||
|   | 7653ef89b8 | ||
|   | be6c0716ee | ||
|   | 4ea75dd1d6 | ||
|   | b708852784 | ||
|   | f700243016 | ||
|   | b232e529f1 | ||
|   | ae3186834f | ||
|   | 23546e27d9 | ||
|   | 1a188f8f72 | ||
|   | 89829f6d7c | ||
|   | 6e3b3bfc53 | ||
|   | 14c95ae9a6 | ||
|   | d3ccbdb5a9 | ||
|   | 1cdf85e1ce | ||
|   | 2982cfab70 | ||
|   | 761fe99fe2 | ||
|   | 6f24d1cbd8 | ||
|   | 898552dcc3 | ||
|   | 6850566be0 | ||
|   | 3036b44798 | ||
|   | acc0edb040 | ||
|   | 316a316d9b | ||
|   | 20b4076b12 | ||
|   | 4d86d34635 | ||
|   | ae7a92ae7b | ||
|   | 67b538fd26 | 
| @@ -1,3 +1,3 @@ | ||||
| NAME=		openrc | ||||
| VERSION=	0.6.1 | ||||
| VERSION=	0.6.4 | ||||
| PKG=		${NAME}-${VERSION} | ||||
|   | ||||
| @@ -896,7 +896,7 @@ | ||||
| # and you're done :) | ||||
|  | ||||
| # By default we don't wait for netplug/ifplugd to configure the interface. | ||||
| # If you would like it to wait so that other services now that network is up | ||||
| # If you would like it to wait so that other services know that network is up | ||||
| # then you can specify a timeout here. | ||||
| #plug_timeout="10" | ||||
| # A value of 0 means wait forever. | ||||
| @@ -936,8 +936,8 @@ | ||||
|  | ||||
| #preup() { | ||||
| #	# Test for link on the interface prior to bringing it up.  This | ||||
| #	# only works on some network adapters and requires the mii-diag | ||||
| #	# package to be installed. | ||||
| #	# only works on some network adapters and requires the | ||||
| #	# sys-apps/net-tools package to be installed. | ||||
| #	if mii-tool "${IFACE}" 2> /dev/null | grep -q 'no link'; then | ||||
| #		ewarn "No link on ${IFACE}, aborting configuration" | ||||
| #		return 1 | ||||
|   | ||||
| @@ -11,7 +11,8 @@ | ||||
|  | ||||
| # Set rc_interactive to "YES" and you'll be able to press the I key during | ||||
| # boot so you can choose to start specific services. Set to "NO" to disable | ||||
| # this feature. | ||||
| # this feature. This feature is automatically disabled if rc_parallel is | ||||
| # set to YES. | ||||
| #rc_interactive="YES" | ||||
|  | ||||
| # If we need to drop to a shell, you can specify it here. | ||||
| @@ -75,8 +76,14 @@ | ||||
| # Set unicode to YES to turn on unicode support for keyboards and screens. | ||||
| #unicode="NO" | ||||
|  | ||||
| # Network fstypes. Below is the default. | ||||
| net_fs_list="afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs nfs nfs4 ocfs2 shfs smbfs" | ||||
| # Below is the default list of network fstypes. | ||||
| # | ||||
| # afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre ncpfs | ||||
| # nfs nfs4 ocfs2 shfs smbfs | ||||
| # | ||||
| # If you would like to add to this list, you can do so by adding your | ||||
| # own fstypes to the following variable. | ||||
| #extra_net_fs_list="" | ||||
|  | ||||
| ############################################################################## | ||||
| # SERVICE CONFIGURATION VARIABLES | ||||
|   | ||||
| @@ -4,7 +4,6 @@ | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	use hostname | ||||
| 	need localmount | ||||
| 	before logger | ||||
| 	after clock sysctl | ||||
| @@ -36,6 +35,12 @@ cleanup_tmp_dir() | ||||
| 		# Faster than find | ||||
| 		rm -rf -- [^ajlq\.]* | ||||
|  | ||||
| 		# pam_mktemp creates a .private directory within which | ||||
| 		# each user gets a private directory with immutable | ||||
| 		# bit set; remove the immutable bit before trying to | ||||
| 		# remove it. | ||||
| 		[ -d /tmp/.private ] && chattr -R -a /tmp/.private | ||||
|  | ||||
| 		find $startopts ! -name . \ | ||||
| 			! -path "./lost+found" \ | ||||
| 			! -path "./lost+found/*" \ | ||||
| @@ -49,8 +54,6 @@ cleanup_tmp_dir() | ||||
| 			! -path "./aquota.group/*" \ | ||||
| 			! -path "./journal" \ | ||||
| 			! -path "./journal/*" \ | ||||
| 			! -path "./.private" \ | ||||
| 			! -path "./.private/*" \ | ||||
| 			-exec rm -rf {} \; | ||||
| 		eend 0 | ||||
| 	else | ||||
|   | ||||
| @@ -8,7 +8,7 @@ depend() | ||||
| { | ||||
| 	need localmount termencoding | ||||
| 	after hotplug bootmisc | ||||
| 	keyword -openvz -prefix -uml -vserver -xenu | ||||
| 	keyword -openvz -prefix -uml -vserver -xenu -lxc | ||||
| } | ||||
|  | ||||
| start() | ||||
|   | ||||
| @@ -8,7 +8,7 @@ depend() | ||||
| { | ||||
| 	need localmount termencoding | ||||
| 	after bootmisc | ||||
| 	keyword -openvz -prefix -uml -vserver -xenu | ||||
| 	keyword -openvz -prefix -uml -vserver -xenu -lxc | ||||
| } | ||||
|  | ||||
| start() | ||||
|   | ||||
| @@ -18,11 +18,6 @@ start() | ||||
| 		local_start | ||||
| 	fi | ||||
|  | ||||
| 	# Support old configs | ||||
| 	if [ -e @SYSCONFDIR@/conf.d/local.start ]; then | ||||
| 		. @SYSCONFDIR@/conf.d/local.start | ||||
| 	fi | ||||
|  | ||||
| 	eend $? "Failed to start local" | ||||
| } | ||||
|  | ||||
| @@ -34,10 +29,5 @@ stop() | ||||
| 		local_stop | ||||
| 	fi | ||||
|  | ||||
| 	# Support old configs | ||||
| 	if [ -e @SYSCONFDIR@/conf.d/local.stop ]; then | ||||
| 		. @SYSCONFDIR@/conf.d/local.stop | ||||
| 	fi | ||||
|  | ||||
| 	eend $? "Failed to stop local" | ||||
| } | ||||
|   | ||||
| @@ -63,17 +63,9 @@ tentative() | ||||
|  | ||||
| 	case "$RC_UNAME" in | ||||
| 	Linux) | ||||
| 		[ -x /sbin/ip ] || return 1 | ||||
| 		LC_ALL=C ip addr show | while read inet address rest; do | ||||
| 	 		case "${inet}" in | ||||
| 			inet6) | ||||
| 				case "${rest}" in | ||||
| 				*" "tentative*) return 2;; | ||||
| 				esac | ||||
| 		[ -x /sbin/ip ] || [ -x /bin/ip ] || return 1 | ||||
| 		[ -n "$(ip -f inet6 addr show tentative)" ] | ||||
| 		;; | ||||
| 			esac | ||||
| 		done | ||||
| 		[ $? = 2 ] | ||||
| 	*) | ||||
| 		local inet= address= rest= | ||||
| 		LC_ALL=C ifconfig -a | while read inet address rest; do | ||||
| @@ -169,7 +161,7 @@ runip() | ||||
| routeflush() | ||||
| { | ||||
| 	if [ "$RC_UNAME" = Linux ]; then | ||||
| 		if [ -x /sbin/ip ]; then | ||||
| 		if [ -x /sbin/ip ] || [ -x /bin/ip ]; then | ||||
| 			ip route flush scope global | ||||
| 			ip route delete default 2>/dev/null | ||||
| 		else | ||||
| @@ -231,8 +223,6 @@ start() | ||||
| 	routeflush | ||||
| 	if [ "$RC_UNAME" = "Linux" ]; then | ||||
| 		ifconfig lo 127.0.0.1 netmask 255.0.0.0 || cr=1  | ||||
| 		route add -net 127.0.0.0 netmask 255.0.0.0 \ | ||||
| 			gw 127.0.0.1 2>/dev/null | ||||
| 		route add -net 127.0.0.0 netmask 255.0.0.0 \ | ||||
| 			gw 127.0.0.1 reject 2>/dev/null | ||||
| 	else | ||||
| @@ -289,9 +279,14 @@ start() | ||||
| 	r=5 | ||||
| 	while [ $r -gt 0 ]; do | ||||
| 		tentative || break | ||||
| 		[ $r = 5 ] && vebegin "Waiting for tentative addresses" | ||||
| 		sleep 1 | ||||
| 		r=$(($r - 1)) | ||||
| 	done | ||||
| 	if [ $r != 5 ]; then | ||||
| 		[ $r != 0 ] | ||||
| 		veend $? | ||||
| 	fi | ||||
| 	 | ||||
| 	if [ -n "$defaultroute" ]; then | ||||
| 		ebegin "Setting default route $defaultroute" | ||||
| @@ -343,7 +338,7 @@ stop() | ||||
| 		then | ||||
| 			veinfo "$int" | ||||
| 			runargs /etc/ifdown."$int" "$downcmd" | ||||
| 			if [ -x /sbin/ip ]; then | ||||
| 			if [ -x /sbin/ip ] || [ -x /bin/ip ]; then | ||||
| 				# We need to do this, otherwise we may | ||||
| 				# fail to add things correctly on restart | ||||
| 				ip address flush dev "$int" 2>/dev/null | ||||
|   | ||||
| @@ -4,7 +4,6 @@ | ||||
|  | ||||
| depend() | ||||
| { | ||||
| 	use hostname | ||||
| 	before bootmisc logger | ||||
| 	keyword -openvz -prefix -vserver | ||||
| } | ||||
|   | ||||
| @@ -15,7 +15,14 @@ _is_bond() | ||||
|  | ||||
| bonding_pre_start() | ||||
| { | ||||
| 	local x= s= slaves="$(_get_array "slaves_${IFVAR}")"  | ||||
| 	local x= s= n= slaves= primary= | ||||
|  | ||||
| 	slaves="$(_get_array "slaves_${IFVAR}")" | ||||
| 	unset slaves_${IFVAR} | ||||
|  | ||||
| 	eval primary="\$primary_${IFVAR}" | ||||
| 	unset primary_${IFVAR} | ||||
|  | ||||
|  | ||||
| 	[ -z "${slaves}" ] && return 0 | ||||
|  | ||||
| @@ -39,13 +46,31 @@ bonding_pre_start() | ||||
| 		return 1 | ||||
| 	fi | ||||
|  | ||||
| 	# Configure the bond. | ||||
| 	# Nice and dynamic :) | ||||
| 	# Interface must be down in order to configure | ||||
| 	_down | ||||
|  | ||||
| 	# Configure the bond mode, then we can reloop to ensure we configure | ||||
| 	# All other options | ||||
| 	for x in /sys/class/net/"${IFACE}"/bonding/mode; do | ||||
| 		[ -f "${x}" ] || continue | ||||
| 		n=${x##*/} | ||||
| 		eval s=\$${n}_${IFVAR} | ||||
| 		if [ -n "${s}" ]; then | ||||
| 			einfo "Setting ${n}: ${s}" | ||||
| 			echo "${s}" >"${x}" || \ | ||||
| 			eerror "Failed to configure $n (${n}_${IFVAR})" | ||||
| 		fi | ||||
| 	done | ||||
| 	# Nice and dynamic for remaining options:) | ||||
| 	for x in /sys/class/net/"${IFACE}"/bonding/*; do | ||||
| 		[ -f "${x}" ] || continue | ||||
| 		eval s=\$${x##*/}_${IFVAR} | ||||
| 		n=${x##*/} | ||||
| 		eval s=\$${n}_${IFVAR} | ||||
| 		[ "${n}" != "mode" ] || continue | ||||
| 		if [ -n "${s}" ]; then | ||||
| 			echo "${s}" >"${x}" | ||||
| 			einfo "Setting ${n}: ${s}" | ||||
| 			echo "${s}" >"${x}" || \ | ||||
| 			eerror "Failed to configure $n (${n}_${IFVAR})" | ||||
| 		fi | ||||
| 	done | ||||
|  | ||||
| @@ -72,6 +97,11 @@ bonding_pre_start() | ||||
| 	# finally add in slaves | ||||
| 	eoutdent | ||||
| 	if [ -d /sys/class/net ]; then | ||||
| 		if [ -n "${primary}" ]; then | ||||
| 			echo "+${primary}" >/sys/class/net/"${IFACE}"/bonding/slaves | ||||
| 			echo "${primary}" >/sys/class/net/"${IFACE}"/bonding/primary | ||||
| 			slaves="${slaves/${primary}/}" | ||||
| 		fi | ||||
| 		for s in ${slaves}; do | ||||
| 			echo "+${s}" >/sys/class/net/"${IFACE}"/bonding/slaves | ||||
| 		done | ||||
| @@ -117,6 +147,12 @@ bonding_stop() | ||||
| 	done | ||||
| 	) | ||||
|  | ||||
| 	_down | ||||
|  | ||||
| 	if [ -d /sys/class/net ]; then | ||||
| 		echo "-${IFACE}" > /sys/class/net/bonding_masters | ||||
| 	fi | ||||
|  | ||||
| 	eend 0 | ||||
| 	return 0 | ||||
| } | ||||
|   | ||||
| @@ -17,6 +17,7 @@ dhclient_start() | ||||
|  | ||||
| 	# Get our options | ||||
| 	# These options only work in Gentoo, and maybe RedHat | ||||
| 	eval args=\$dhclient_${IFVAR} | ||||
| 	eval opts=\$dhcp_${IFVAR} | ||||
| 	[ -z "${opts}" ] && opts=${dhcp} | ||||
|  | ||||
|   | ||||
| @@ -27,8 +27,8 @@ ifplugd_pre_start() | ||||
| 		return 0 | ||||
| 	fi | ||||
|  | ||||
| 	# We don't work on bonded, bridges, tun/tap, vlan or wireless | ||||
| 	for f in bond bridge tuntap vlan wireless; do | ||||
| 	# We don't work on bonded, bridges, tun/tap or vlan | ||||
| 	for f in bond bridge tuntap vlan; do | ||||
| 		if type "_is_${f}" >/dev/null 2>&1; then | ||||
| 			if _is_${f}; then | ||||
| 				veinfo "ifplugd does not work with ${f}" | ||||
|   | ||||
| @@ -1,9 +1,18 @@ | ||||
| # Copyright (c) 2007-2008 Roy Marples <roy@marples.name> | ||||
| # All rights reserved. Released under the 2-clause BSD license. | ||||
|  | ||||
| _ip() | ||||
| { | ||||
| 	if [ -x /bin/ip ]; then | ||||
| 		echo /bin/ip | ||||
| 	else | ||||
| 		echo /sbin/ip | ||||
| 	fi | ||||
| } | ||||
|  | ||||
| iproute2_depend() | ||||
| { | ||||
| 	program /sbin/ip | ||||
| 	program $(_ip) | ||||
| 	provide interface | ||||
| 	after ifconfig | ||||
| } | ||||
| @@ -160,7 +169,8 @@ _add_route() | ||||
|  | ||||
| 	# We cannot use a metric if we're using a nexthop | ||||
| 	if ! ${have_metric} && \ | ||||
| 		[ -n "${metric}" -a -z "${cmd##* nexthop }" ] | ||||
| 		[ -n "${metric}" -a \ | ||||
| 			"${cmd##* nexthop }" = "$cmd" ] | ||||
| 	then | ||||
| 		cmd="${cmd} metric ${metric}" | ||||
| 	fi | ||||
|   | ||||
| @@ -20,7 +20,7 @@ _is_vlan() | ||||
| _get_vlans() | ||||
| { | ||||
| 	[ -e /proc/net/vlan/config ] || return 1 | ||||
| 	sed -n -e 's/^\(.*[0-9]\) \(.* \) .*'"${IFACE}"'$/\1/p' /proc/net/vlan/config | ||||
| 	sed -n -e 's/^\W*\([^ ]*\) \(.* \) .*'"${IFACE}"'$/\1/p' /proc/net/vlan/config | ||||
| } | ||||
|  | ||||
| _check_vlan() | ||||
|   | ||||
| @@ -2,7 +2,8 @@ DIR=	${LIBDIR}/pkgconfig | ||||
| SRCS=	einfo.pc.in openrc.pc.in | ||||
| INC=	einfo.pc openrc.pc | ||||
|  | ||||
| sed -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${GITVER}\"/p' ../../Makefile > version.h | ||||
| .DEFAULT: | ||||
| 	${SED} -n -e 's/^VERSION=[[:space:]]*\([^[:space:]]*\).*/#define VERSION "\1${GITVER}\"/p' ../../Makefile > version.h | ||||
|  | ||||
| SED_EXTRA=	-e 's:@VERSION@:${VERSION}:g' | ||||
|  | ||||
|   | ||||
| @@ -6,26 +6,30 @@ | ||||
| if [ -f /proc/acpi/ac_adapter/AC*/state ]; then | ||||
| 	cat /proc/acpi/ac_adapter/AC*/state | while read line; do | ||||
| 		case "$line" in | ||||
| 		"state:"*"off-line") return 128;; | ||||
| 		"state:"*"off-line") exit 128;; | ||||
| 		esac | ||||
| 	done | ||||
| elif [ -f /sys/class/power_supply/AC*/online ]; then | ||||
| 	cat /sys/class/power_supply/AC*/online | while read line; do | ||||
| 		[ "${line}" = 0 ] && exit 128 | ||||
| 	done | ||||
| elif [ -f /proc/pmu/info ]; then | ||||
| 	cat /proc/pmu/info | while read line; do | ||||
| 		case "$line" in | ||||
| 		"AC Power"*": 0") return 128;; | ||||
| 		"AC Power"*": 0") exit 128;; | ||||
| 		esac | ||||
| 	done | ||||
| elif type envstat >/dev/null 2>&1; then | ||||
| 	# NetBSD has envstat | ||||
| 	envstat -d acpiacad0 2>/dev/null | while read line; do | ||||
| 		case "$line" in | ||||
| 		"connected:"*"OFF") return 128;; | ||||
| 		"connected:"*"OFF") exit 128;; | ||||
| 		esac | ||||
| 	done | ||||
| elif sysctl -q hw.acpi.acline >/dev/null 2>/dev/null; then | ||||
| 	case $(sysctl -n hw.acpi.acline) in | ||||
| 	0) return 1;; | ||||
| 	*) return 0;; | ||||
| 	0) exit 1;; | ||||
| 	*) exit 0;; | ||||
| 	esac | ||||
| else | ||||
| 	exit 255 | ||||
|   | ||||
| @@ -17,7 +17,7 @@ fi | ||||
| if [ -e /etc/runlevels/"$RC_DEFAULTLEVEL"/consolefont \ | ||||
| 	 -o -e /etc/runlevels/"$RC_BOOTLEVEL"/consolefont ]; then | ||||
| 	printf "\033%s" "$termencoding" >"$CONSOLE" 2>/dev/null | ||||
| 	if [ -r "$RC_LIBEXECDIR"/console/font -a -x /bin/setfont ]; then | ||||
| 	if [ -r "$RC_LIBEXECDIR"/console/font -a -x /usr/bin/setfont ]; then | ||||
| 		font="$(cat "$RC_LIBEXECDIR"/console/font)" | ||||
| 		[ -c "$CONSOLE" ] && cons="-C $CONSOLE" | ||||
| 		setfont $cons "$RC_LIBEXECDIR"/console/"$font" 2>/dev/null | ||||
| @@ -29,7 +29,7 @@ if [ -e /etc/runlevels/"$RC_DEFAULTLEVEL"/keymaps \ | ||||
| 	 -o -e /etc/runlevels/"$RC_BOOTLEVEL"/keymaps ]; then | ||||
| 	kbd_mode $kmode -C "$CONSOLE" 2>/dev/null | ||||
| 	if [ -r "$RC_LIBEXECDIR"/console/keymap ]; then | ||||
| 		loadkeys "$RC_LIBEXECDIR"/console/keymap 2>/dev/null | ||||
| 		loadkeys -q "$RC_LIBEXECDIR"/console/keymap 2>/dev/null | ||||
| 	fi | ||||
| fi | ||||
|  | ||||
|   | ||||
| @@ -38,7 +38,8 @@ stop_addon() | ||||
| 	( import_addon "$1-stop" ) | ||||
| } | ||||
|  | ||||
| net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs" | ||||
| net_fs_list="afs cifs coda davfs fuse fuse.sshfs gfs glusterfs lustre | ||||
| ncpfs nfs nfs4 ocfs2 shfs smbfs $extra_net_fs_list" | ||||
| is_net_fs() | ||||
| { | ||||
| 	[ -z "$1" ] && return 1 | ||||
|   | ||||
| @@ -26,6 +26,8 @@ do_unmount() | ||||
| 		# Unmounting a shared mount can unmount other mounts, so | ||||
| 		# we need to check the mount is still valid | ||||
| 		mountinfo --quiet "$mnt" || continue | ||||
| 		# Ensure we interpret all characters properly. | ||||
| 		mnt=$(printf "$mnt") | ||||
|  | ||||
| 		case "$cmd" in | ||||
| 			umount) | ||||
|   | ||||
| @@ -643,7 +643,7 @@ static int EINFO_PRINTF(3, 0) | ||||
| 		fprintf(f, "\n"); | ||||
| 	if (_eprefix) | ||||
| 		fprintf(f, "%s%s%s|", _ecolor(f, color), _eprefix, _ecolor(f, ECOLOR_NORMAL)); | ||||
| 	fprintf(f, "%s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL)); | ||||
| 	fprintf(f, " %s*%s ", _ecolor(f, color), _ecolor(f, ECOLOR_NORMAL)); | ||||
| 	retval += _eindent(f); | ||||
| 	va_copy(ap, va); | ||||
| 	retval += vfprintf(f, fmt, ap) + 3; | ||||
| @@ -800,7 +800,7 @@ ebegin(const char *EINFO_RESTRICT fmt, ...) | ||||
| 	va_start(ap, fmt); | ||||
| 	retval = _einfovn(fmt, ap); | ||||
| 	va_end(ap); | ||||
| 	retval += printf("..."); | ||||
| 	retval += printf(" ..."); | ||||
| 	if (colour_terminal(stdout)) | ||||
| 		retval += printf("\n"); | ||||
| 	LASTCMD("ebegin"); | ||||
| @@ -817,7 +817,7 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg) | ||||
| 	if (!msg) | ||||
| 		return; | ||||
|  | ||||
| 	cols = get_term_columns(fp) - (strlen(msg) + 3); | ||||
| 	cols = get_term_columns(fp) - (strlen(msg) + 5); | ||||
|  | ||||
| 	/* cons25 is special - we need to remove one char, otherwise things | ||||
| 	 * do not align properly at all. */ | ||||
| @@ -831,18 +831,15 @@ _eend(FILE * EINFO_RESTRICT fp, int col, ECOLOR color, const char *msg) | ||||
| 	if (term_is_cons25) | ||||
| 		cols--; | ||||
|  | ||||
| 	/* If extra spacing is required around msg, then please change | ||||
| 	 * via a runtime knob and leave this default as is as it saves 2  | ||||
| 	 * valuable columns when running on 80 column screens. */ | ||||
| 	if (cols > 0 && colour_terminal(fp)) { | ||||
| 		fprintf(fp, "%s%s %s[%s%s%s]%s\n", up, tgoto(goto_column, 0, cols), | ||||
| 		fprintf(fp, "%s%s %s[%s %s %s]%s\n", up, tgoto(goto_column, 0, cols), | ||||
| 		    ecolor(ECOLOR_BRACKET), ecolor(color), msg, | ||||
| 		    ecolor(ECOLOR_BRACKET), ecolor(ECOLOR_NORMAL)); | ||||
| 	} else { | ||||
| 		if (col > 0) | ||||
| 			for (i = 0; i < cols - col; i++) | ||||
| 				fprintf(fp, " "); | ||||
| 		fprintf(fp, " [%s]\n", msg); | ||||
| 		fprintf(fp, " [ %s ]\n", msg); | ||||
| 	} | ||||
| } | ||||
|  | ||||
| @@ -1030,7 +1027,7 @@ ebeginv(const char *EINFO_RESTRICT fmt, ...) | ||||
|  | ||||
| 	va_start(ap, fmt); | ||||
| 	retval = _einfovn(fmt, ap); | ||||
| 	retval += printf("..."); | ||||
| 	retval += printf(" ..."); | ||||
| 	if (colour_terminal(stdout)) | ||||
| 		retval += printf("\n"); | ||||
| 	va_end(ap); | ||||
|   | ||||
| @@ -773,7 +773,7 @@ handle_bad_signal(int sig) | ||||
| #endif | ||||
|  | ||||
| #include "_usage.h" | ||||
| #define getoptstring "o:" getoptstring_COMMON | ||||
| #define getoptstring "o:s:S" getoptstring_COMMON | ||||
| static const struct option longopts[] = { | ||||
| 	{ "override", 1, NULL, 'o' }, | ||||
| 	{ "service",  1, NULL, 's' }, | ||||
|   | ||||
| @@ -1318,6 +1318,12 @@ runscript(int argc, char **argv) | ||||
| 			prefix = NULL; | ||||
| 			retval = svc_exec("status", NULL); | ||||
| 		} else { | ||||
| 			if (strcmp(optarg, "pause") == 0) { | ||||
| 				ewarn("WARNING: 'pause' is deprecated; please use '--nodeps stop'"); | ||||
| 				deps = false; | ||||
| 				optarg = "stop"; | ||||
| 			} | ||||
|  | ||||
| 			if (strcmp(optarg, "conditionalrestart") == 0 || | ||||
| 			    strcmp(optarg, "condrestart") == 0) | ||||
| 			{ | ||||
|   | ||||
		Reference in New Issue
	
	Block a user