diff options
author | Olav Vitters <olav@vitters.nl> | 2020-07-26 21:46:44 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-07-26 21:46:44 +0200 |
commit | 244c9a00ae9a0dc62156aeb8781c2b22da0ad96e (patch) | |
tree | c0d76ed490862837a8a37bb61ed8e653e5cc2558 /network-scripts/ifup-plusb | |
parent | d0d18c6de12efeba25eb41d7cf207037027e4964 (diff) | |
parent | 6ca701a23c74b245f35750149a22f7d21805a8e0 (diff) | |
download | initscripts-244c9a00ae9a0dc62156aeb8781c2b22da0ad96e.tar initscripts-244c9a00ae9a0dc62156aeb8781c2b22da0ad96e.tar.gz initscripts-244c9a00ae9a0dc62156aeb8781c2b22da0ad96e.tar.bz2 initscripts-244c9a00ae9a0dc62156aeb8781c2b22da0ad96e.tar.xz initscripts-244c9a00ae9a0dc62156aeb8781c2b22da0ad96e.zip |
Merge tag '10.04' into distro/mga
10.04 release
Diffstat (limited to 'network-scripts/ifup-plusb')
-rw-r--r-- | network-scripts/ifup-plusb | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/network-scripts/ifup-plusb b/network-scripts/ifup-plusb new file mode 100644 index 00000000..1b29afeb --- /dev/null +++ b/network-scripts/ifup-plusb @@ -0,0 +1,43 @@ +#!/bin/sh +# +# /etc/sysconfig/network-scripts/ifup-plusb +# +# the plusb network driver is a USB host-host cable based on the Prolific +# chip. It works a lot like the plip driver. +# +# To get the plusb module to load automatically at boot, you will need to +# add the following lines to /etc/conf.modules: +# +# alias plusb0 plusb +# + +cd /etc/sysconfig/network-scripts +. ./network-functions + +CONFIG=$1 +source_config + +if [ "foo$2" = "fooboot" -a "${ONBOOT}" = "no" ] +then + exit +fi + +[ -z "$PREFIX" ] && eval $(/bin/ipcalc --prefix ${IPADDR} ${NETMASK}) + +if [ ${BROADCAST} != "" ] ; then + ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} broadcast ${BROADCAST} dev ${DEVICE} +else + ip addr add ${IPADDR} peer ${REMIP}/${PREFIX} dev ${DEVICE} +fi +ip link set up dev ${DEVICE} + +. /etc/sysconfig/network + +if [ "${GATEWAY}" != "" ]; then + if [ "${GATEWAYDEV}" = "" -o "${GATEWAYDEV}" = "${DEVICE}" ]; then + # set up default gateway + ip route replace default ${METRIC:+metric $METRIC} via ${GATEWAY} + fi +fi + +/etc/sysconfig/network-scripts/ifup-post $1 |