Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
OBS:Server:2.10:Staging
kiwi-hooks-for-obs-worker
prenetwork.sh
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File prenetwork.sh of Package kiwi-hooks-for-obs-worker
# to be stored in /kiwi-hooks/prenetwork.sh in the initrd echo "sleep a little for nic renames" sleep 1 if test `uname -m` = "s390x" ; then grep -q "readchannel=0.0.0820" /proc/cmdline && qeth_configure -l -n 1 0.0.0620 0.0.0621 0.0.0622 1 grep -q "readchannel=0.0.f220" /proc/cmdline && qeth_configure -l -n 0 0.0.f200 0.0.f201 0.0.f202 1 grep -q "readchannel=0.0.f120" /proc/cmdline && qeth_configure -l -n 0 0.0.f100 0.0.f101 0.0.f102 1 fi # if [ -z "$bond_mode" ] ; then # bond_mode=0 # fi # if [ -z "$bond_driver" ] ; then # bond_driver=qeth # fi #fi if test -n "$bond_mode" -a -n "$bond_driver" ; then N=0 for i in /sys/class/net/e* ; do INT=`basename $i` DR=`readlink $i/device/driver` DRX=`basename $DR` if test "$DRX" = "$bond_driver" ; then E[$N]=$INT N=$((N+1)) fi done MDEV=${E[0]} BOND_MO="mode=balance-rr miimon=1000" ; BMO="balance-rr" ; BMI="1000" case $bond_mode in 0) BOND_MO="mode=balance-rr miimon=1000" ; BMO="balance-rr" ; BMI="1000" ;; 1) BOND_MO="mode=1 miimon=100 primary=$MDEV" ; BMO="1" ; BMI="100" ;; 4) BOND_MO="mode=4 miimon=100" ; BMO="4" ; BMI="100";; esac cat << EOF >> /etc/sysconfig/network/ifcfg-bond0 BONDING_MASTER='yes' BONDING_MODULE_OPTS='$BOND_MO' STARTMODE='auto' USERCONTROL='no' EOF if test `uname -m` = "s390x" ; then cat << EOF >> /etc/sysconfig/network/ifcfg-bond0 BOOTPROTO='static' IPADDR='$hostip' IPADDR_1='$hostip6' EOF else cat << EOF >> /etc/sysconfig/network/ifcfg-bond0 BOOTPROTO='dhcp' EOF fi M=0 while test $M -lt $N ; do echo "BONDING_SLAVE$M='"${E[$M]}"'" M=$((M+1)) done >> /etc/sysconfig/network/ifcfg-bond0 rm -f /etc/sysconfig/network/ifcfg-eth0 export iface_static=bond0 # now barefooted... if [ ! -r "/sys/class/net/bonding_masters" ] ; then /sbin/modprobe bonding max_bonds=0 fi echo "+bond0" > /sys/class/net/bonding_masters echo $BMO > /sys/class/net/bond0/bonding/mode echo $BMI > /sys/class/net/bond0/bonding/miimon M=0 while test $M -lt $N ; do slave=${E[$M]} ip link set dev $slave down ip addr flush dev $slave echo "+$slave" > /sys/class/net/bond0/bonding/slaves M=$((M+1)) done ip addr flush dev bond0 if test `uname -m` = "s390x" ; then ip addr add $hostip dev bond0 ip link set dev bond0 up fi fi
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor