123456789101112131415161718192021222324252627282930313233 |
- #!/bin/bash
- if [ "$(cat /sys/class/net/eth1/address)" = "52:54:00:31:14:02" ]; then
- ifconfig eth1 192.168.0.2/24
- fi
- if [ "$(cat /sys/class/net/eth1/address)" = "52:54:01:31:14:02" ]; then
- ifconfig eth1 192.168.0.3/24
- fi
- ETH2MAC="$(cat /sys/class/net/eth2/address)"
- if [ "$ETH2MAC" = "52:54:00:31:14:03" -o "$ETH2MAC" = "52:54:01:31:14:03" ]; then
- rm -f /etc/resolv.conf.eth0
- cp /etc/resolv.conf /etc/resolv.conf.eth0
- dhclient eth2
- killall dhclient
- cp /etc/resolv.conf.eth0 /etc/resolv.conf
- sleep 60 && cp /etc/resolv.conf.eth0 /etc/resolv.conf &
- fi
- #(
- # dd if=/dev/zero of=/var/cache/fscache/image bs=1M count=512
- # losetup /dev/loop1 /var/cache/fscache/image
- # mkfs.ext4 /dev/loop1
- # mount /dev/loop1 /var/cache/fscache
- # sed -e 's/^#RUN/RUN/' -i /etc/default/cachefilesd
- # /etc/init.d/cachefilesd start
- #)&
- #fmtutil-sys --all &
- exit 0
|