50-control 228 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
#!/bin/sh
# setup control(8) states

[ -z "$GLOBAL_CONTROL" ] ||
	echo "$GLOBAL_CONTROL" \
	| tr ' ' '\n' \
	| while IFS=':' read facility state; do
		[ -z "$facility" -o -z "$state" ] ||
			control "$facility" "$state"
	done
: