From 3a7b7797b3c0d7aecdae266015ec534ea713600f Mon Sep 17 00:00:00 2001 From: Stefan Wold Date: Wed, 9 Jan 2013 21:18:30 +0100 Subject: [PATCH] Connect() no longer needed Due to a change in the interface naming scheme as of the latest release of systemd there's no longer a safe way to detect interface names thus rendering this code deprecated. Automatic dialup code has been removed as of this commit and we no longer check if an active interface exists, lget/lin will just timeout if there is no internet connectivity. --- libs/connect.lunar | 79 --------------------------------------------- libs/download.lunar | 1 - prog/lvu | 1 - 3 files changed, 81 deletions(-) delete mode 100644 libs/connect.lunar diff --git a/libs/connect.lunar b/libs/connect.lunar deleted file mode 100644 index 7e66c9120..000000000 --- a/libs/connect.lunar +++ /dev/null @@ -1,79 +0,0 @@ -#!/bin/bash -############################################################ -# # -# download.lunar - get sources from the net # -# # -############################################################ -# leach is part of the sorcery spell management utility # -# Copyright 2001 by Kyle Sallee # -############################################################ -# # -# this WAS the leach script of a source based Linux distro,# -# calls Sorcerer GNU/Linux, or SGL. SGL is no longer # -# available with GPL license. Since this script was taken # -# before licensing scheme change, no legal problems I # -# guess. # -# # -# the code is re-written for Lunar. The previous Copyright # -# notices are kept; just in case some code is left :=) # -# Kagan Kongar , 20020519 # -# # -# This secondly was lget mostly, and has been moved into # -# a separate lunar functions file handling all the generic # -# downloading functionality for lunar # -# # -############################################################ -# # -# Parts Copyrighted Jason Johnston 2002 under GPLv2 # -# # -# Parts Copyrighted Kagan Kongar 2002 under GPLv2 # -# # -# Parts Copyrighted Auke Kok 2002 under GPLv2 # -# # -############################################################ - - -connect() { - local TIMEOUT - debug_msg "connect ($@)" - - if ! ip link | egrep -q '^[0-9]*: (eth|wlan|ppp|ath|tun|ra|usb|br)[0-9]+[^>]*[<,]UP[,>]' - then - pon - - # Timeout in deciseconds to wait for Interface to come up. - TIMEOUT=30 - - until ip link | egrep -q '^[0-9]*: (eth|wlan|ppp|ath|tun|ra|usb|br)[0-9]+[^>]*[<,]UP[,>]' || [ $TIMEOUT == 0 ] - do - sleep 10 - (( TIMEOUT-- )) - done - disconnect - - fi - -} - - -disconnect() { - debug_msg "disconnect ($@)" - if ps -C disconnect > /dev/null - then return - fi - - rm -f $TMPDIR/disconnect - cat << EOF > $TMPDIR/disconnect -#!/bin/sh - -while ps -A | grep -q "lget"; do sleep 120; done -poff -rm -f $TMPDIR/disconnect -EOF - -chmod a+x $TMPDIR/disconnect - $TMPDIR/disconnect & - -} - - diff --git a/libs/download.lunar b/libs/download.lunar index 5cda2bd5f..d31feb04d 100644 --- a/libs/download.lunar +++ b/libs/download.lunar @@ -37,7 +37,6 @@ download_url() { local RETVAL debug_msg "download_url($@)" verbose_msg "trying to download \"${2}\" from \"${1}\"" - connect && plugin_call SOURCE_DOWNLOAD $1 $2 $3 return $? } diff --git a/prog/lvu b/prog/lvu index e3609a3cf..ba011ccfd 100755 --- a/prog/lvu +++ b/prog/lvu @@ -812,7 +812,6 @@ show_urls() { ( echo $URL$2 return 1 } - connect() { return 0 ; } LRESORT_URL= FRESORT_URL=