summaryrefslogtreecommitdiffstats
path: root/etc/network.subr
diff options
context:
space:
mode:
authorschweikh <schweikh@FreeBSD.org>2002-10-12 10:31:31 +0000
committerschweikh <schweikh@FreeBSD.org>2002-10-12 10:31:31 +0000
commitb7d872536535fe8afd8ad5080a504fa41a77c095 (patch)
treec750ff3f496fe6079fff457037e64eba1f20e162 /etc/network.subr
parentc60d03847fad771361b5a5590015bfe65a1b3023 (diff)
downloadFreeBSD-src-b7d872536535fe8afd8ad5080a504fa41a77c095.zip
FreeBSD-src-b7d872536535fe8afd8ad5080a504fa41a77c095.tar.gz
Fix style bugs:
* Space -> tabs conversion. * Removed blanks before semicolon in "if ... ; then". * Proper indentation of misindented lines. * Put a full stop after some comments. * Removed whitespace at end of line. Approved by: silence from gordon
Diffstat (limited to 'etc/network.subr')
-rw-r--r--etc/network.subr80
1 files changed, 40 insertions, 40 deletions
diff --git a/etc/network.subr b/etc/network.subr
index ae00cfd..4887042 100644
--- a/etc/network.subr
+++ b/etc/network.subr
@@ -15,50 +15,50 @@ stop_cmd="network_stop"
convert_host_conf()
{
- host_conf=$1; shift;
- nsswitch_conf=$1; shift;
- awk ' \
- /^[:blank:]*#/ { next } \
- /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
- /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
- /nis/ { nsswitch[c] = "nis"; c++; next } \
- { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
- END { \
- printf "hosts: "; \
- for (i in nsswitch) printf "%s ", nsswitch[i]; \
- printf "\n"; \
- }' < $host_conf > $nsswitch_conf
+ host_conf=$1; shift;
+ nsswitch_conf=$1; shift;
+ awk ' \
+ /^[:blank:]*#/ { next } \
+ /(hosts|local|file)/ { nsswitch[c] = "files"; c++; next } \
+ /(dns|bind)/ { nsswitch[c] = "dns"; c++; next } \
+ /nis/ { nsswitch[c] = "nis"; c++; next } \
+ { printf "Warning: unrecognized line [%s]", $0 > "/dev/stderr" } \
+ END { \
+ printf "hosts: "; \
+ for (i in nsswitch) printf "%s ", nsswitch[i]; \
+ printf "\n"; \
+ }' < $host_conf > $nsswitch_conf
}
generate_host_conf()
{
- nsswitch_conf=$1; shift;
- host_conf=$1; shift;
-
- awk '
-BEGIN {
- xlat["files"] = "hosts";
- xlat["dns"] = "bind";
- xlat["nis"] = "nis";
- cont = 0;
-}
-sub(/^[\t ]*hosts:/, "") || cont {
- if (!cont)
- srcs = ""
- sub(/#.*/, "")
- gsub(/[][]/, " & ")
- cont = sub(/\\$/, "")
- srcs = srcs " " $0
-}
-END {
- print "# Auto-generated from nsswitch.conf, do not edit"
- ns = split(srcs, s)
- for (n = 1; n <= ns; ++n) {
- if (s[n] in xlat)
- print xlat[s[n]]
- }
-}
-' <$nsswitch_conf >$host_conf
+ nsswitch_conf=$1; shift;
+ host_conf=$1; shift;
+
+ awk '
+ BEGIN {
+ xlat["files"] = "hosts";
+ xlat["dns"] = "bind";
+ xlat["nis"] = "nis";
+ cont = 0;
+ }
+ sub(/^[\t ]*hosts:/, "") || cont {
+ if (!cont)
+ srcs = ""
+ sub(/#.*/, "")
+ gsub(/[][]/, " & ")
+ cont = sub(/\\$/, "")
+ srcs = srcs " " $0
+ }
+ END {
+ print "# Auto-generated from nsswitch.conf, do not edit"
+ ns = split(srcs, s)
+ for (n = 1; n <= ns; ++n) {
+ if (s[n] in xlat)
+ print xlat[s[n]]
+ }
+ }
+ ' <$nsswitch_conf >$host_conf
}
network_gif_setup() {
OpenPOWER on IntegriCloud