Open main menu
Home
Random
Log in
Settings
About Sugar Labs
Disclaimers
Sugar Labs
Search
Changes
← Older edit
Newer edit →
Dextrose/Server/Addons
(view source)
Revision as of 10:18, 27 March 2011
1,042 bytes added
,
10:18, 27 March 2011
no edit summary
Line 21:
Line 21:
rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:1
rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:1
rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:2
rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:2
+
+
Make custom named based on original XS:
+
+
# setup custom named
+
mv /sbin/ifup-local /sbin/ifup-local.rpmsave
+
cat > /sbin/ifup-local <<EOF
+
# Authors: Jerry Vonau <jvonau@shaw.ca>
+
# Martin Langhoff <martin@laptop.org>
+
#
+
if [ x"\${1}" = x ]; then
+
exit
+
else
+
case \$1 in
+
eth0|ppp0)
+
namedtpl=/etc/named-xs.conf.tpl
+
namedconf=/etc/named-xs.conf
+
FWD=""
+
for i in \`cat /etc/resolv.conf | grep nameserver | awk '{print \$2}'\`;
+
do
+
if [ x\$i != x127.0.0.1 ]; then
+
FWD="\$FWD \$i;"
+
else
+
exit
+
fi
+
done
+
cp \$namedtpl \$namedconf
+
logger "changing /etc/named-xs.conf using forwarders \$FWD"
+
sed -i -e "s/@@BASEDNSFWD@@/\$FWD/" \$namedconf
+
+
logger "changing /etc/resolv.conf for principal school server"
+
cp /etc/sysconfig/olpc-scripts/resolv.conf /etc/resolv.conf
+
;;
+
esac
+
fi
+
EOF
+
chmod 755 /sbin/ifup-local
Nubae
36
edits