[Resolvconf-devel] Bug#519364: Patch
Stefan Monnier
monnier at iro.umontreal.ca
Thu Mar 12 02:57:22 UTC 2009
tags 519364 +patch
thanks
BTW, the patch below might help take care of the dependency.
Stefan
--- /sbin/resolvconf 2006-08-09 09:36:43.000000000 -0400
+++ /tmp/monnier/resolvconf 2009-03-11 22:56:26.031905443 -0400
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# Need bash because of use of ${FOO/bar}
#
# Licensed under the GNU GPL. See /usr/share/doc/resolvconf/copyright.
@@ -41,11 +41,13 @@
report_iface_err() {
report_err "$* not allowed in interface record name"
}
- [ "${IFACE/\/}" = "$IFACE" ] || { report_iface_err "Slash" ; exit 1 ; }
- [ "${IFACE/ }" = "$IFACE" ] || { report_iface_err "Space" ; exit 1 ; }
- [ "${IFACE#.}" = "$IFACE" ] || { report_iface_err "Initial dot" ; exit 1 ; }
- [ "${IFACE#-}" = "$IFACE" ] || { report_iface_err "Initial hyphen" ; exit 1 ; }
- [ "${IFACE#\~}" = "$IFACE" ] || { report_iface_err "Initial tilde" ; exit 1 ; }
+ case "$IFACE" in
+ */*) report_iface_err "Slash" ; exit 1 ;;
+ *" "*) report_iface_err "Space" ; exit 1 ;;
+ .*) report_iface_err "Initial dot" ; exit 1 ;;
+ -*) report_iface_err "Initial hyphen" ; exit 1 ;;
+ ~*) report_iface_err "Initial tilde" ; exit 1 ;;
+ esac
;;
*)
report_err "Invalid argument"
More information about the Resolvconf-devel
mailing list