diff options
author | Olav Vitters <olav@vitters.nl> | 2020-07-30 22:10:35 +0200 |
---|---|---|
committer | Olav Vitters <olav@vitters.nl> | 2020-07-30 22:10:35 +0200 |
commit | a5c52c00c16be69e14360222520129d30f76e042 (patch) | |
tree | d44ff9f87b2985ead827c72c55b5aaee23c5dd10 /mandriva/ifup-hso | |
parent | 817ca842f086f7290f183720539834263c2f1afe (diff) | |
download | initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.gz initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.bz2 initscripts-a5c52c00c16be69e14360222520129d30f76e042.tar.xz initscripts-a5c52c00c16be69e14360222520129d30f76e042.zip |
Align Makefile and tree structure with upstream tree structure
Instead of placing the custom files with the upstream files it seems
clearer to have them mostly separated. This makes it easier to see which
parts are custom and which parts are more or less upstream.
As a result the upstream Makefile only needed minor changes to
accomodate this. The Makefile is NOT bug free, unfortunately it doesn't
always do the right thing, this due to inexperience.
Diffstat (limited to 'mandriva/ifup-hso')
-rwxr-xr-x | mandriva/ifup-hso | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/mandriva/ifup-hso b/mandriva/ifup-hso deleted file mode 100755 index 859e5bf9..00000000 --- a/mandriva/ifup-hso +++ /dev/null @@ -1,78 +0,0 @@ -#! /bin/bash - -. /etc/init.d/functions - -cd /etc/sysconfig/network-scripts -. ./network-functions - -CONFIG=$1 -[ -f "${CONFIG}" ] || CONFIG=ifcfg-${1} -source_config - -if [ "${2}" = "boot" -a "${ONBOOT}" = "no" ]; then - exit -fi - -[ -z "$CELLULAR_CID" ] && CELLULAR_CID=1 -[ "${DEBUG}" = "yes" ] && CHATDBG="-v" - -CHATSCRIPT=/etc/sysconfig/network-scripts/chat-${DEVNAME} -[ -f ${CHATSCRIPT} ] || { - CHATSCRIPT=/etc/sysconfig/network-scripts/chat-${PARENTDEVNAME} -} -[ -f ${CHATSCRIPT} ] || { - echo $"/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist" - echo $"ifup-hso for ${DEVNAME} exiting" - logger -p daemon.info -t ifup-hso \ - $"/etc/sysconfig/network-scripts/chat-${DEVNAME} does not exist for ${DEVICE}" - exit 1 -} - -CELLULAR_PIN=$(cat pin-${DEVICE} 2>/dev/null) -if [ -n "$CELLULAR_PIN" -a -x /usr/sbin/comgt ]; then - COMGTPIN=$CELLULAR_PIN comgt PIN -d $MODEMPORT -fi - -if ! /usr/sbin/chat ${CHATDBG} -s -f ${CHATSCRIPT} < $MODEMPORT > $MODEMPORT; then - echo $"Connect script failed" - exit 1 -fi - -CHATSCRIPT=`mktemp /tmp/chatXXXXXX` -CHATRESULT=`mktemp /tmp/chatXXXXXX` -cat > $CHATSCRIPT <<EOF -ABORT ERROR -TIMEOUT 10 -"" ATZ -OK "AT_OWANCALL=${CELLULAR_CID},1,0" -OK "AT_OWANDATA=${CELLULAR_CID}" -OK "" -EOF -TRIES=10 -BOOTARG=$2 - -while [ "$TRIES" -gt 0 ]; do - if /usr/sbin/chat ${CHATDBG} -s -V -f ${CHATSCRIPT} < $MODEMPORT > $MODEMPORT 2> ${CHATRESULT}; then - DATA=$(grep ^_OWANDATA $CHATRESULT) - if [ -n "$DATA" ]; then - set $(echo $DATA | cut -d ',' -f 2,4,5 --output-delimiter ' ') - IPADDR=$1 - DNS1=$2 - DNS2=$3 - break - fi - fi - sleep 2 - let TRIES=$TRIES-1 -done -rm -f $CHATSCRIPT $CHATRESULT - -if [ "$TRIES" = 0 ]; then - echo $"Connect script failed (HSO)" - exit 1 -fi - -ifconfig $DEVICE $IPADDR up -route add default dev $DEVICE ${METRIC:+metric $METRIC} -export DNS1 DNS2 -exec /etc/sysconfig/network-scripts/ifup-post ${CONFIG} $BOOTARG |