引用:
! /bin/sh
config_path=/etc/sysconfig/network
config_path=/etc/sysconfig/network/custom
case "$1" in
home)
rm $config_path/ifcfg-eth-id-00:40:ca:c7:04:fc
cp $custom_path/routes.home $config_path/routes
cp $custom_path/ifcfg-wlan-id-00:0c:f1:1d:a5:6d.home $config_path/ifcfg-wlan-id-00:0c:f1:1d:a5:6d
/etc/init.d/network restart
;;
internet)
cp $custom_path/routes.internet $config_path/routes
cp $custom_path/ifcfg-eth-id-00:40:ca:c7:04:fc.internet $config_path/ifcfg-eth-id-00:40:ca:c7:04:fc
/etc/init.d/network restart
;;
abis)
cp $custom_path/routes.abis $config_path/routes
cp $custom_path/ifcfg-eth-id-00:40:ca:c7:04:fc.abis $config_path/ifcfg-eth-id-00:40:ca:c7:04:fc
/etc/init.d/network restart
;;
*)
echo 'usage: chg_nets '
;;
esac