mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +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{'AUTOUPDATE'} = 'off';
|
||||||
$pakfiresettings{'UUID'} = 'on';
|
$pakfiresettings{'UUID'} = 'on';
|
||||||
|
|
||||||
|
system("/usr/local/bin/pakfire update >/dev/null") if not -e "/opt/pakfire/db/lists/packages_list.db";
|
||||||
|
|
||||||
&Header::getcgihash(\%pakfiresettings);
|
&Header::getcgihash(\%pakfiresettings);
|
||||||
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
&General::readhash("${General::swroot}/main/settings", \%mainsettings);
|
||||||
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
|
||||||
|
|||||||
@@ -4,6 +4,11 @@
|
|||||||
. /etc/sysconfig/rc
|
. /etc/sysconfig/rc
|
||||||
. ${rc_functions}
|
. ${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)
|
eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings)
|
||||||
|
|
||||||
MAX=160
|
MAX=160
|
||||||
@@ -31,25 +36,25 @@ case "$1" in
|
|||||||
boot_mesg "Starting connection daemon..."
|
boot_mesg "Starting connection daemon..."
|
||||||
echo_ok
|
echo_ok
|
||||||
|
|
||||||
while [ "$COUNT" -lt "$MAX" ]; do
|
while [ "$COUNT" -lt "$MAX" ]; do
|
||||||
if [ ! -e "/var/ipfire/red/keepconnected" ]; then
|
if [ ! -e "/var/ipfire/red/keepconnected" ]; then
|
||||||
# User pressed disconnect in gui
|
# User pressed disconnect in gui
|
||||||
msg_log "Stopping by user request. Exiting."
|
msg_log "Stopping by user request. Exiting."
|
||||||
/etc/rc.d/init.d/network stop red
|
/etc/rc.d/init.d/network stop red
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
if [ -e "/var/ipfire/red/active" ]; then
|
if [ -e "/var/ipfire/red/active" ]; then
|
||||||
# Successfully connected in time
|
# Successfully connected in time
|
||||||
echo "0" > /var/ipfire/red/keepconnected
|
echo "0" > /var/ipfire/red/keepconnected
|
||||||
msg_log "System is online. Exiting."; exit 0
|
msg_log "System is online. Exiting."; exit 0
|
||||||
fi
|
fi
|
||||||
if ( ! ps ax | grep -q [p]ppd ); then
|
if ( ! ps ax | grep -q [p]ppd ); then
|
||||||
msg_log "No pppd is running. Trying reconnect."
|
msg_log "No pppd is running. Trying reconnect."
|
||||||
break # because pppd died
|
break # because pppd died
|
||||||
fi
|
fi
|
||||||
sleep 5
|
sleep 5
|
||||||
(( COUNT+=1 ))
|
(( COUNT+=1 ))
|
||||||
done
|
done
|
||||||
|
|
||||||
/etc/rc.d/init.d/network stop red
|
/etc/rc.d/init.d/network stop red
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user