#!/bin/sh
-# Copyright 2006 Gentoo Foundation
# Copyright 2007 Roy Marples
# All rights reserved
local result=
while [ -n "$1" ]; do
case " ${result} " in
- *" $1 "*) ;;
- *) result="${result} $1" ;;
+ *" $1 "*);;
+ *) result="${result} $1";;
esac
shift
done
shift
fi
-# -l is a Gentoo option that lists our resolv files
-# optionally for a specific interface
+# -l lists our resolv files, optionally for a specific interface
if [ "x${CMD}" = "x-l" -o "x${CMD}" = "x-i" ]; then
[ -d "${IFACEDIR}" ] || exit 0
case "${LINE}" in
"nameserver "*)
case "${LINE#* }" in
- 127.*) continue ;;
+ 127.*) continue;;
esac
NS="${NS}${LINE#* } "
;;
if [ "x${CMD}" = "x-a" ]; then
for x in '/' \\ ' ' '*'; do
case "${IFACE}" in
- *[${x}]*) error_exit "${x} not allowed in interface name" ;;
+ *[${x}]*) error_exit "${x} not allowed in interface name";;
esac
done
for x in '.' '-' '~'; do
case "${IFACE}" in
- [${x}]*) error_exit "${x} not allowed at start of interface name" ;;
+ [${x}]*) error_exit "${x} not allowed at start of interface name";;
esac
done
[ "x${CMD}" = "x-a" -a -t 0 ] && error_exit "No file given via stdin"