mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-12 04:05:53 +02:00
Nochmal 2 Fixes.
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@817 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
@@ -34,6 +34,8 @@ $pakfiresettings{'DELPAKS'} = '';
|
||||
$pakfiresettings{'AUTOUPDATE'} = 'off';
|
||||
$pakfiresettings{'UUID'} = 'on';
|
||||
|
||||
system("/usr/local/bin/pakfire update >/dev/null") if not -e "/opt/pakfire/db/lists/packages_list.db";
|
||||
|
||||
&Header::getcgihash(\%pakfiresettings);
|
||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
||||
|
||||
@@ -4,6 +4,11 @@
|
||||
. /etc/sysconfig/rc
|
||||
. ${rc_functions}
|
||||
|
||||
# Stop if nothing is configured
|
||||
if [ ! -s "/var/ipfire/ppp/settings" ];then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings)
|
||||
|
||||
MAX=160
|
||||
@@ -31,25 +36,25 @@ case "$1" in
|
||||
boot_mesg "Starting connection daemon..."
|
||||
echo_ok
|
||||
|
||||
while [ "$COUNT" -lt "$MAX" ]; do
|
||||
if [ ! -e "/var/ipfire/red/keepconnected" ]; then
|
||||
# User pressed disconnect in gui
|
||||
msg_log "Stopping by user request. Exiting."
|
||||
/etc/rc.d/init.d/network stop red
|
||||
exit 0
|
||||
fi
|
||||
if [ -e "/var/ipfire/red/active" ]; then
|
||||
# Successfully connected in time
|
||||
echo "0" > /var/ipfire/red/keepconnected
|
||||
msg_log "System is online. Exiting."; exit 0
|
||||
fi
|
||||
if ( ! ps ax | grep -q [p]ppd ); then
|
||||
msg_log "No pppd is running. Trying reconnect."
|
||||
break # because pppd died
|
||||
fi
|
||||
sleep 5
|
||||
(( COUNT+=1 ))
|
||||
done
|
||||
while [ "$COUNT" -lt "$MAX" ]; do
|
||||
if [ ! -e "/var/ipfire/red/keepconnected" ]; then
|
||||
# User pressed disconnect in gui
|
||||
msg_log "Stopping by user request. Exiting."
|
||||
/etc/rc.d/init.d/network stop red
|
||||
exit 0
|
||||
fi
|
||||
if [ -e "/var/ipfire/red/active" ]; then
|
||||
# Successfully connected in time
|
||||
echo "0" > /var/ipfire/red/keepconnected
|
||||
msg_log "System is online. Exiting."; exit 0
|
||||
fi
|
||||
if ( ! ps ax | grep -q [p]ppd ); then
|
||||
msg_log "No pppd is running. Trying reconnect."
|
||||
break # because pppd died
|
||||
fi
|
||||
sleep 5
|
||||
(( COUNT+=1 ))
|
||||
done
|
||||
|
||||
/etc/rc.d/init.d/network stop red
|
||||
|
||||
|
||||
Reference in New Issue
Block a user