[services-cvs] CVS services/proc
CVS User miham
root at tempel.bibl.u-szeged.hu
2004. Nov. 17., Sze, 14:12:07 CET
Update of /var/lib/cvs/services/proc
In directory tempel:/tmp/cvs-serv4468
Modified Files:
boinc.sh
Log Message:
Temp needed ifup_serpub script.
--- /var/lib/cvs/services/proc/boinc.sh 2004/11/17 11:51:00 1.14
+++ /var/lib/cvs/services/proc/boinc.sh 2004/11/17 13:12:07 1.15
@@ -22,6 +22,48 @@
# Gracefully exit if the package has been removed.
test -x $DAEMON || exit 0
+#
+# This script brings up the interface to serpub vlan
+ifup_serpub() {
+ decho 1 -ne "Bringing up interface to SERPUB VLAN.."
+ if (grep "eth0.0300" /etc/network/interfaces >>/dev/null 2>>/dev/null); then
+ decho 2 -ne '.'
+ if (ifconfig | grep "eth0.0300" >>/dev/null 2>>/dev/null); then
+ decho 2 -ne 'Interface already up!\n'
+ return
+ else
+ decho 2 -ne 'Bringing up interface..'
+ ifup eth0.0300 >>/dev/null 2>>/dev/null
+ decho 2 -ne '. Ok!\n'
+ fi
+ else
+ decho 2 -ne "Configuring interface.."
+ hostnum=$(hostname | cut -c5-)
+ decho 2 -ne '.'
+ serpubip=$(expr 140 + ${hostnum})
+ decho 2 -ne '.'
+ echo "auto eth0.0300" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo "iface eth0.0300 inet static" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo -ne "\taddress 160.114.159.${serpubip}\n" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo -ne "\tnetmask 255.255.255.128\n" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo -ne "\tnetwork 160.114.159.128\n" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo -ne "\tbroadcast 160.114.159.255\n" >> /etc/network/interfaces
+ decho 2 -ne '.'
+ echo -ne "\tgateway 160.114.159.129\n" >> /etc/network/interfaces
+ decho 2 -ne '. Ok!\n'
+
+ decho 2 -ne 'Bringing up interface..'
+ ifup eth0.0300 >>/dev/null 2>>/dev/null
+ decho 2 -ne '. Ok!\n'
+ decho 1 -ne '. Ok!\n'
+ fi
+}
+
# Loading common scripts..
if [ -r /etc/services.d/common.sh ]; then
. /etc/services.d/common.sh
További információk a(z) Services-cvs levelezőlistáról