Difference between revisions of "Dextrose/Server/Addons"
Jump to navigation
Jump to search
(One intermediate revision by one other user not shown) | |||
Line 1: | Line 1: | ||
+ | {{Obsolete|Moved and died at http://sugardextrose.org}} | ||
+ | |||
Some changes that will be included in the dextrose server, a lot of it based on work done by the AU olpc guys. | Some changes that will be included in the dextrose server, a lot of it based on work done by the AU olpc guys. | ||
Line 33: | Line 35: | ||
exit | exit | ||
else | else | ||
− | + | case \$1 in | |
− | + | eth0|ppp0) | |
namedtpl=/etc/named-xs.conf.tpl | namedtpl=/etc/named-xs.conf.tpl | ||
namedconf=/etc/named-xs.conf | namedconf=/etc/named-xs.conf | ||
Line 42: | Line 44: | ||
if [ x\$i != x127.0.0.1 ]; then | if [ x\$i != x127.0.0.1 ]; then | ||
FWD="\$FWD \$i;" | FWD="\$FWD \$i;" | ||
− | + | else | |
exit | exit | ||
− | + | fi | |
done | done | ||
− | + | cp \$namedtpl \$namedconf | |
logger "changing /etc/named-xs.conf using forwarders \$FWD" | logger "changing /etc/named-xs.conf using forwarders \$FWD" | ||
sed -i -e "s/@@BASEDNSFWD@@/\$FWD/" \$namedconf | sed -i -e "s/@@BASEDNSFWD@@/\$FWD/" \$namedconf | ||
− | |||
logger "changing /etc/resolv.conf for principal school server" | logger "changing /etc/resolv.conf for principal school server" | ||
− | + | cp /etc/sysconfig/olpc-scripts/resolv.conf /etc/resolv.conf | |
− | + | ;; | |
esac | esac | ||
fi | fi | ||
EOF | EOF | ||
chmod 755 /sbin/ifup-local | chmod 755 /sbin/ifup-local |
Latest revision as of 23:34, 16 May 2016
Take out active antenna stuff:
# clean up active antenna stuff and superflous network connections here: rm -f /etc/sysconfig/network-scripts/route-lanbond0 rm -f /etc/sysconfig/network-scripts/route-eth0 rm -f /etc/sysconfig/network-scripts/ifcfg-mshbond0 rm -f /etc/sysconfig/network-scripts/ifcfg-mshbond1 rm -f /etc/sysconfig/network-scripts/ifcfg-mshbond2 rm -f /etc/sysconfig/network-scripts/ifcfg-msh0 rm -f /etc/sysconfig/network-scripts/ifcfg-msh1 rm -f /etc/sysconfig/network-scripts/ifcfg-msh2 rm -f /etc/sysconfig/network-scripts/ifcfg-wmesh0 rm -f /etc/sysconfig/network-scripts/ifcfg-wmesh1 rm -f /etc/sysconfig/network-scripts/ifcfg-wmesh2 rm -f /etc/sysconfig/network-scripts/ifcfg-eth1 rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0 rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:0 rm -f /etc/sysconfig/network-scripts/ifcfg-lanbond0:1 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 |