Permalink
Browse files

Bugfix dns= option to process once configuration is fetched

  • Loading branch information...
kaihendry committed Mar 22, 2013
1 parent 7fc5cdc commit a7564557d933428225e90583b1cc4707ee49a872
Showing with 18 additions and 24 deletions.
  1. +18 −0 etc/webc/live-config.sh
  2. +0 −24 etc/webc/network-up.d/resolvconf
View
@@ -237,6 +237,24 @@ cat ${link}/content/about.xhtml.bak |
sub_literal 'OS not running' "${webc_version} ${stamp}" |
sub_literal 'var aboutwebc = "";' "var aboutwebc = \"$(echo ${install_qa_url} | sed 's,&,&,g')\";" > ${link}/content/about.xhtml
+if cmdline_has dns
+then
+cat /etc/resolv.conf | sed '/nameserver/d' > /etc/resolv.conf.tmp
+
+for i in $(cmdline_get dns)
+do
+ IFS=,; for dns in $i
+ do
+ echo nameserver $dns
+ done
+done >> /etc/resolv.conf.tmp
+
+mv -f /etc/resolv.conf /etc/resolv.conf.old
+mv -f /etc/resolv.conf.tmp /etc/resolv.conf
+chmod 644 /etc/resolv.conf
+fi
+
+
} # end of process_options
update_cmdline() {
@@ -1,24 +0,0 @@
-#!/bin/bash
-
-. /etc/webc/functions.sh
-. /etc/webc/webc.conf
-while ! test -e /etc/webc/cmdline; do
- sleep 1
- test $SECONDS -gt 60 && exit 1
-done
-
-cmdline_has dns || exit 0
-
-cat /etc/resolv.conf | sed '/nameserver/d' > /etc/resolv.conf.tmp
-
-for i in $(cmdline_get dns)
-do
- IFS=,; for dns in $i
- do
- echo nameserver $dns
- done
-done >> /etc/resolv.conf.tmp
-
-mv -f /etc/resolv.conf /etc/resolv.conf.old
-mv -f /etc/resolv.conf.tmp /etc/resolv.conf
-chmod 644 /etc/resolv.conf

0 comments on commit a756455

Please sign in to comment.