&getExistingSongs();
print %songs;
}
-
-if ($ARGV[0] eq 'play') {
+elsif ($ARGV[0] eq 'play') {
if ($debug){print "Yes we are called and we will play $ARGV[1]\n";}
system("/usr/bin/mpg123 -b 1024 --aggressive -q \"$ARGV[1]\" 2>/dev/null >/dev/null &");
}
-
-if ($ARGV[0] eq 'stop') {
+elsif ($ARGV[0] eq 'stop') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
if ( $PID ne "" ){
if ($debug){print "Stopping $PID\n";}
}
else {&stopweb();}
}
-
-if ($ARGV[0] eq 'volup') {
+elsif ($ARGV[0] eq 'volup') {
if ($debug){print "Increasing Volume\n";}
system("/usr/bin/amixer set Master $ARGV[1]%+ 2>/dev/null >/dev/null");
}
-
-if ($ARGV[0] eq 'voldown') {
+elsif ($ARGV[0] eq 'voldown') {
if ($debug){print "Decreasing Volume\n";}
system("/usr/bin/amixer set Master $ARGV[1]%- 2>/dev/null >/dev/null");
}
-
-if ($ARGV[0] eq 'playall') {
+elsif ($ARGV[0] eq 'playall') {
if ($debug){print "Playing everything\n";}
system("/usr/bin/mpg123 -b 1024 --aggressive -Zq@ /var/ipfire/mpfire/playlist 2>/dev/null >/dev/null &");
}
-
-if ($ARGV[0] eq 'pause') {
+elsif ($ARGV[0] eq 'pause') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Pausing Process $PID\n";}
system("kill -STOP $PID");
}
-
-if ($ARGV[0] eq 'resume') {
+elsif ($ARGV[0] eq 'resume') {
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
if ($debug){print "Resuming Process $PID\n";}
system("kill -CONT $PID");
}
-
-if ($ARGV[0] eq 'next') {
+elsif ($ARGV[0] eq 'next') {
if ($debug){print "Next Song\n";}
my $PID = `ps -ef | grep mpg123 | grep playlist | head -1 | awk '{ print \$2 }'`;
system("kill -SIGINT $PID");
}
-
-if ($ARGV[0] eq 'song') {
- my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3`;
+elsif ($ARGV[0] eq 'song') {
+ my $song = `lsof -nX \| grep mpg123 \| grep REG \| grep mem | grep mp3 \| grep -v "sh -c"`;
my @song = split(/\//,$song);
my $i = @song;
- print $song[$i-1];
+ if ( $i == 0 ){
+ my $song = `ps -ef \| grep wget \| grep EXTM3U \| grep -v "sh -c"`;
+ my @song = split(/\//,$song);
+ print $song[2];
}
-
-if ($ARGV[0] eq 'playweb') {
+ else { print $song[$i-1];}
+ }
+elsif ($ARGV[0] eq 'playweb') {
&General::readhash("${General::swroot}/proxy/settings", \%proxysettings);
if ($debug){print "Playing webstream\n";}
if ($proxysettings{'UPSTREAM_PROXY'}) {
system("wget -qO - `wget -qO - $ARGV[1]` | mpg123 -b 1024 --aggressive -Zq - 2>/dev/null >/dev/null &");
}
}
-
-if ($ARGV[0] eq 'stopweb') {
+elsif ($ARGV[0] eq 'stopweb') {
&stopweb();
}
WARNING: translation string unused: backup key info
WARNING: translation string unused: backup media info
WARNING: translation string unused: backup missing key
+WARNING: translation string unused: backup password
WARNING: translation string unused: backup protect key password
WARNING: translation string unused: backup sets
WARNING: translation string unused: backup to floppy
+WARNING: translation string unused: bad characters in
WARNING: translation string unused: bewan adsl pci st
WARNING: translation string unused: bewan adsl usb
WARNING: translation string unused: bleeding rules
+WARNING: translation string unused: blue access use hint
WARNING: translation string unused: blue interface
WARNING: translation string unused: cache management
WARNING: translation string unused: cache size
WARNING: translation string unused: connect
WARNING: translation string unused: connect the modem
WARNING: translation string unused: could not connect to
+WARNING: translation string unused: could not connect to www ipcop org
WARNING: translation string unused: could not connect to www ipfire org
WARNING: translation string unused: could not create directory
WARNING: translation string unused: could not download latest patch list
WARNING: translation string unused: could not open installed updates file
WARNING: translation string unused: could not open update information file
WARNING: translation string unused: create
+WARNING: translation string unused: create new backup
WARNING: translation string unused: current dynamic leases
WARNING: translation string unused: current media
WARNING: translation string unused: current ovpn
WARNING: translation string unused: daily firewallhits
WARNING: translation string unused: dat without key
WARNING: translation string unused: dbfile
+WARNING: translation string unused: ddns help dnsmadeeasy
+WARNING: translation string unused: ddns help freedns
+WARNING: translation string unused: ddns help plus
WARNING: translation string unused: debugme
+WARNING: translation string unused: dhcp base ip fixed lease
+WARNING: translation string unused: dhcp create fixed leases
+WARNING: translation string unused: dhcp fixed lease err1
+WARNING: translation string unused: dhcp fixed lease help1
WARNING: translation string unused: dhcp server disabled on blue interface
WARNING: translation string unused: dhcp server enabled on blue interface
WARNING: translation string unused: dial user password
WARNING: translation string unused: dialup settings
WARNING: translation string unused: disconnect
WARNING: translation string unused: display traffic at home
+WARNING: translation string unused: dns server
WARNING: translation string unused: do not log this port list
WARNING: translation string unused: done
WARNING: translation string unused: downlink speed
WARNING: translation string unused: enabledtitle
WARNING: translation string unused: encrypted
WARNING: translation string unused: err bk 1
+WARNING: translation string unused: err bk 10 password
WARNING: translation string unused: err bk 2 key
WARNING: translation string unused: err bk 3 tar
WARNING: translation string unused: err bk 4 gz
WARNING: translation string unused: optional data
WARNING: translation string unused: optionsfw portlist hint
WARNING: translation string unused: optionsfw warning
+WARNING: translation string unused: or
WARNING: translation string unused: original
WARNING: translation string unused: other countries
WARNING: translation string unused: ovpn
WARNING: translation string unused: ovpnsys log
WARNING: translation string unused: package failed to install
WARNING: translation string unused: password contains illegal characters
+WARNING: translation string unused: password crypting key
WARNING: translation string unused: passwords must be at least 6 characters in length
WARNING: translation string unused: polfile
WARNING: translation string unused: pots
WARNING: translation string unused: profiles
+WARNING: translation string unused: proxy no proxy extend
+WARNING: translation string unused: proxy no proxy local
WARNING: translation string unused: proxy port
WARNING: translation string unused: psk
WARNING: translation string unused: quick control
WARNING: translation string unused: rebooting
WARNING: translation string unused: refresh update list
WARNING: translation string unused: released
+WARNING: translation string unused: removable device advice
WARNING: translation string unused: reportfile
WARNING: translation string unused: requested data
WARNING: translation string unused: restore hardware settings
WARNING: translation string unused: root
+WARNING: translation string unused: root path
WARNING: translation string unused: root user password
WARNING: translation string unused: route subnet is invalid
+WARNING: translation string unused: safe removal of umounted device
WARNING: translation string unused: save error
+WARNING: translation string unused: select media
WARNING: translation string unused: send email notification
WARNING: translation string unused: send test mail
WARNING: translation string unused: server reserved
WARNING: translation string unused: smbreload
WARNING: translation string unused: squid extension methods
WARNING: translation string unused: squid extension methods invalid
+WARNING: translation string unused: squid fix cache
+WARNING: translation string unused: ssh access tip
WARNING: translation string unused: ssnetwork status
WARNING: translation string unused: sspasswords
WARNING: translation string unused: sssystem status
WARNING: translation string unused: to email adr
WARNING: translation string unused: to install an update
WARNING: translation string unused: to warn email bad
+WARNING: translation string unused: too long 80 char max
WARNING: translation string unused: traffic back
WARNING: translation string unused: traffic calc time
WARNING: translation string unused: traffic calc time bad
WARNING: translation string unused: traffic warn level bad
WARNING: translation string unused: transfer limits
WARNING: translation string unused: transparent on
+WARNING: translation string unused: umount
+WARNING: translation string unused: umount removable media before to unplug
WARNING: translation string unused: unencrypted
WARNING: translation string unused: update transcript
WARNING: translation string unused: updates
WARNING: translation string unused: web proxy configuration
WARNING: translation string unused: week
WARNING: translation string unused: weekly firewallhits
+WARNING: translation string unused: xtaccess bad transfert
WARNING: translation string unused: yearly firewallhits
############################################################################
# Checking cgi-bin translations for language: en #
############################################################################
-< backup password
-< bad characters in
-< blue access use hint
-< could not connect to www ipcop org
-< create new backup
-< ddns help dnsmadeeasy
-< ddns help freedns
-< ddns help plus
-< dhcp base ip fixed lease
-< dhcp create fixed leases
-< dhcp fixed lease err1
-< dhcp fixed lease help1
-< dns server
-< err bk 10 password
-< or
-< password crypting key
-< proxy no proxy extend
-< proxy no proxy local
-< removable device advice
-< root path
-< safe removal of umounted device
-< select media
-< squid fix cache
-< ssh access tip
-< too long 80 char max
-< umount
-< umount removable media before to unplug
-< xtaccess bad transfert
&Header::showhttpheaders();
-sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;'>" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
+sub refreshpage{&Header::openbox( 'Waiting', 1, "<meta http-equiv='refresh' content='1;' />" );print "<center><img src='/images/clock.gif' alt='' /><br/><font color='red'>$Lang::tr{'pagerefresh'}</font></center>";&Header::closebox();}
&Header::getcgihash(\%mpfiresettings);
-&Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120'>");
+&Header::openpage($Lang::tr{'mpfire'}, 1, "<meta http-equiv='refresh' content='120' />");
&Header::openbigbox('100%', 'left', '', $errormessage);
############################################################################################################################
system("/usr/local/bin/mpfirectrl scan $mpfiresettings{'SCANDIR'} $mpfiresettings{'SCANDIRDEPS'}");
refreshpage();
}
-
-if ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
-if ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");}
-if ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");}
-if ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");}
-if ( $mpfiresettings{'ACTION'} eq ">>" ){system("/usr/local/bin/mpfirectrl next");}
-if ( $mpfiresettings{'ACTION'} eq "stopweb" ){system("/usr/local/bin/mpfirectrl stopweb");}
-if ( $mpfiresettings{'ACTION'} eq "playweb" ){system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
-if ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup 5");}
-if ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");}
-if ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");}
-if ( $mpfiresettings{'ACTION'} eq "--" ){system("/usr/local/bin/mpfirectrl voldown 10");}
-if ( $mpfiresettings{'ACTION'} eq "playlist" ){system("/usr/local/bin/mpfirectrl playall");}
-if ( $mpfiresettings{'ACTION'} eq "playalbum" )
+elsif ( $mpfiresettings{'ACTION'} eq ">" ){system("/usr/local/bin/mpfirectrl","play","\"$mpfiresettings{'FILE'}\"");}
+elsif ( $mpfiresettings{'ACTION'} eq "x" ){system("/usr/local/bin/mpfirectrl stop");}
+elsif ( $mpfiresettings{'ACTION'} eq "||" ){system("/usr/local/bin/mpfirectrl pause");}
+elsif ( $mpfiresettings{'ACTION'} eq "|>" ){system("/usr/local/bin/mpfirectrl resume");}
+elsif ( $mpfiresettings{'ACTION'} eq ">>" ){system("/usr/local/bin/mpfirectrl next");}
+elsif ( $mpfiresettings{'ACTION'} eq "stopweb" ){system("/usr/local/bin/mpfirectrl stopweb");}
+elsif ( $mpfiresettings{'ACTION'} eq "playweb" ){system("/usr/local/bin/mpfirectrl","playweb","\"$mpfiresettings{'FILE'}\"");}
+elsif ( $mpfiresettings{'ACTION'} eq "+" ){system("/usr/local/bin/mpfirectrl volup 5");}
+elsif ( $mpfiresettings{'ACTION'} eq "-" ){system("/usr/local/bin/mpfirectrl voldown 5");}
+elsif ( $mpfiresettings{'ACTION'} eq "++" ){system("/usr/local/bin/mpfirectrl volup 10");}
+elsif ( $mpfiresettings{'ACTION'} eq "--" ){system("/usr/local/bin/mpfirectrl voldown 10");}
+elsif ( $mpfiresettings{'ACTION'} eq "playlist" ){system("/usr/local/bin/mpfirectrl playall");}
+elsif ( $mpfiresettings{'ACTION'} eq "playalbum" )
{
my @temp = "";
my @album = split(/\|/,$mpfiresettings{'album'});
close(DATEI);
system("/usr/local/bin/mpfirectrl playall");
}
-if ( $mpfiresettings{'ACTION'} eq "playartist" )
+elsif ( $mpfiresettings{'ACTION'} eq "playartist" )
{
my @temp = "";
my @artist = split(/\|/,$mpfiresettings{'artist'});
close(DATEI);
system("/usr/local/bin/mpfirectrl playall");
}
-if ( $mpfiresettings{'ACTION'} eq "playall" )
+elsif ( $mpfiresettings{'ACTION'} eq "playall" )
{
my @temp = "";
foreach (@songdb){
close(DATEI);
system("/usr/local/bin/mpfirectrl playall");
}
-if ( $mpfiresettings{'SHOWLIST'} ){delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};&General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);}
+elsif ( $mpfiresettings{'SHOWLIST'} ){delete $mpfiresettings{'__CGI__'};delete $mpfiresettings{'x'};delete $mpfiresettings{'y'};&General::writehash("${General::swroot}/mpfire/settings", \%mpfiresettings);}
############################################################################################################################
################################### Aufbau der HTML Seite fr globale Sambaeinstellungen ####################################
my @playlist = <DATEI>;
close(DATEI);
+my %hash;
+foreach (@songdb){
+ my @song = split(/\|/,$_);
+ chomp($song[0]);
+ $hash{$song[0]}=$song[1]." - ".$song[2]." - ".$song[7].":".$song[8];
+}
+
print <<END
<table width='95%' cellspacing='0'>
<tr bgcolor='$color{'color20'}'><td colspan='9' align='left'><b>$Lang::tr{'current playlist'}</b></td></tr>
-<tr><td align='center'><textarea cols='120' rows='10' name='playlist' style='font-size:10px' readonly='readonly' >@playlist</textarea><br/>
+<tr><td align='center'><textarea cols='120' rows='10' name='playlist' style='font-size:11px' readonly='readonly' >
+END
+;
+foreach (@playlist){chomp($_);print $hash{$_}."\n";}
+print <<END
+</textarea><br/>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='hidden' name='ACTION' value='playlist' />
<input type='image' alt='$Lang::tr{'play'}' title='$Lang::tr{'play'}' src='/images/media-playback-start.png' />
&Header::openbox("100%", "center", "Abfrage");
my @output = `/usr/local/bin/pakfire resolvedeps $pakfiresettings{'INSPAKS'}`;
print <<END;
- <table><tr><td colspan='2'>Sie maechten folgende Pakete installieren: "$pakfiresettings{'INSPAKS'}". Moeglicherweise haben diese Pakete Abhaengigkeiten, d.h. andere Pakete muessen zusaetzlich installiert werden. Dazu sehen sie unten eine Liste.
+ <table><tr><td colspan='2'>$Lang::tr{'pakfire install package'}.$pakfiresettings{'INSPAKS'}.$Lang::tr{'pakfire possible dependency'}
<pre>
END
foreach (@output) {
}
print <<END;
</pre>
- <tr><td colspan='2'>Moechten Sie der Installation aller Pakete zustimmen?
+ <tr><td colspan='2'>$Lang::tr{'pakfire accept all'}
<tr><td colspan='2'>
<tr><td align='right'><form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='hidden' name='INSPAKS' value='$pakfiresettings{'INSPAKS'}' />
<tr><td>
<img src='/images/indicator.gif' alt='$Lang::tr{'aktiv'}' />
<td>
- Pakfire fuehrt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.
+ $Lang::tr{'pakfire working'}
<tr><td colspan='2' align='center'>
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<input type='image' alt='$Lang::tr{'reload'}' src='/images/view-refresh.png' />
<input type='hidden' name='ACTION' value='remove' />
<input type='image' alt='$Lang::tr{'remove'}' src='/images/list-remove.png' />
</td>
- <td width='40%' align="center">Installierte Addons:<br />
+ <td width='40%' align="center">$Lang::tr{'pakfire installed addons'}<br />
<select name="DELPAKS" size="10" multiple>
END
<br /><hr /><br />
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<table width='100%'>
- <tr><td colspan='2'>Zur Verfuegung stehende Updates:
+ <tr><td colspan='2'>$Lang::tr{'pakfire updates'}
<tr><td width='20%'> <td width='60%' align='center'>
<select name="UPDPAKS" size="5" disabled>
END
<br /><hr /><br />
<form method='post' action='$ENV{'SCRIPT_NAME'}'>
<table width='100%'>
- <tr><td width='40%' align="right">Automatische Updates taeglich ausfuehren:
+ <tr><td width='40%' align="right">$Lang::tr{'pakfire update daily'}
<td width='10%' align="left"><input type="checkbox" name="AUTOUPDATE" $checked{'AUTOUPDATE'}{'on'} />
- <td width='40%' align="right">Registrierung am Master-Server:
+ <td width='40%' align="right">$Lang::tr{'pakfire register'}
<td width='10%' align="left"><input type="checkbox" name="UUID" $checked{'UUID'}{'on'} />
<tr><td width='100%' colspan="4" align="right"><input type="submit" name="ACTION" value="$Lang::tr{'save'}" />
</table>
+++ /dev/null
-#!/usr/bin/perl
-#
-# SmoothWall CGIs
-#
-# This code is distributed under the terms of the GPL
-#
-# (c) The SmoothWall Team
-#
-#
-
-use strict;
-
-# enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
-
-require '/var/ipfire/general-functions.pl';
-require "${General::swroot}/lang.pl";
-require "${General::swroot}/header.pl";
-require "${General::swroot}/graphs.pl";
-
-#workaround to suppress a warning when a variable is used only once
-my @dummy = ( ${Header::colourred} );
-undef (@dummy);
-
-my %qossettings = ();
-my %checked = ();
-my %netsettings = ();
-my $message = '';
-my $errormessage = "";
-my $c = "";
-my $direntry = "";
-my $classentry = "";
-my $subclassentry = "";
-my $l7ruleentry = "";
-my $portruleentry = "";
-my $tosruleentry = "";
-my @tmp = ();
-my @classes = ();
-my @subclasses = ();
-my @l7rules = ();
-my @portrules = ();
-my @tosrules = ();
-my @tmpline = ();
-my @classline = ();
-my @subclassline = ();
-my @l7ruleline = ();
-my @portruleline = ();
-my @tosruleline = ();
-my @proto = ();
-my %selected= ();
-my @checked = ();
-my $classfile = "/var/ipfire/qos/classes";
-my $subclassfile = "/var/ipfire/qos/subclasses";
-my $level7file = "/var/ipfire/qos/level7config";
-my $portfile = "/var/ipfire/qos/portconfig";
-my $tosfile = "/var/ipfire/qos/tosconfig";
-&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
-
-&overviewgraph($qossettings{'RED_DEV'});
-&overviewgraph($qossettings{'IMQ_DEV'});
-
-my %color = ();
-my %mainsettings = ();
-&General::readhash("${General::swroot}/main/settings", \%mainsettings);
-&General::readhash("/srv/web/ipfire/html/themes/".$mainsettings{'THEME'}."/include/colors.txt", \%color);
-
-my %cgiparams=();
-# Maps a nice printable name to the changing part of the pid file, which
-# is also the name of the program
-
-
-# Generate Graphs from rrd Data
-&Graphs::updatecpugraph ("day");
-&Graphs::updateloadgraph ("day");
-
-&Header::showhttpheaders();
-&Header::getcgihash(\%cgiparams);
-&Header::openpage($Lang::tr{'status information'}, 1, '');
-&Header::openbigbox('100%', 'left');
-
- open( FILE, "< $classfile" ) or die "Unable to read $classfile";
- @classes = <FILE>;
- close FILE;
- open( FILE, "< $subclassfile" ) or die "Unable to read $subclassfile";
- @subclasses = <FILE>;
- close FILE;
- &Header::openbox('100%', 'left', 'QoS Graphen');
- print <<END
- <table width='100%'> <tr><td align='center'><font color='red'>Diese Seite braucht je nach Geschwindigkeit des Computers laenger zum Laden.</font>
- <tr><td align='center'><b>Klasse:</b>
-END
-;
- foreach $classentry (sort @classes)
- {
- @classline = split( /\;/, $classentry );
- $qossettings{'CLASS'}=$classline[1];
- print <<END
- <input type="button" onClick="swapVisibility('$qossettings{'CLASS'}')" value='$qossettings{'CLASS'}' />
-END
-;
- }
- print <<END
- </table>
-END
-;
- &Header::closebox();
- foreach $classentry (sort @classes)
- {
- @classline = split( /\;/, $classentry );
- $qossettings{'DEV'}=$classline[0];
- $qossettings{'CLASS'}=$classline[1];
- &gengraph($qossettings{'DEV'},$qossettings{'CLASS'});
- print "<div id='$qossettings{'CLASS'}' style='display: none'>";
- &Header::openbox('100%', 'center', "$qossettings{'CLASS'} ($qossettings{'DEV'})");
- print <<END
- <table>
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png' />
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-borrowed.png' />
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-bytes.png' />
-END
-;
- foreach $subclassentry (sort @subclasses)
- {
- @subclassline = split( /\;/, $subclassentry );
- if ($subclassline[1] eq $classline[1]) {
- $qossettings{'DEV'}=$subclassline[0];
- $qossettings{'SCLASS'}=$subclassline[2];
- &gengraph($qossettings{'DEV'},$qossettings{'SCLASS'});
- print <<END
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-packets.png' />
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-borrowed.png' />
- <tr><td colspan='2' align='center'><img src='/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'SCLASS'}_$qossettings{'DEV'}-bytes.png' />
-END
-;
- }
- }
- print "\t\t</table>";
- &Header::closebox();
- print "</div>\n";
- }
-print <<END
- </table>
-END
-;
-
-if (( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'RED_DEV'}.png") && ( -e "/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png")) {
- print <<END
- <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'RED_DEV'}.png" />
- <tr><td colspan='9' align='center'><img alt="" src="/graphs/qos-graph-$qossettings{'IMQ_DEV'}.png" />
-END
-;}
-
-
-&Header::closebox();
-&Header::closebigbox();
-&Header::closepage();
-
-sub gengraph {
- $qossettings{'DEV'} = shift;
- $qossettings{'CLASS'} = shift;
- my $ERROR="";
- if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) {
- $qossettings{'CLASSPRFX'} = '1';
- } else {
- $qossettings{'CLASSPRFX'} = '2';
- }
- my $color=random_hex_color(6);
-
- RRDs::graph ("/srv/web/ipfire/html/graphs/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}-packets.png",
- "--start", "-3240", "-aPNG", "-i", "-z",
- "--alt-y-grid", "-w 600", "-h 150", "-r",
- "--color", "SHADEA#EAE9EE",
- "--color", "SHADEB#EAE9EE",
- "--color", "BACK#FFFFFF",
- "-t $qossettings{'CLASS'} ($qossettings{'DEV'})",
- "DEF:pkts=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:pkts:AVERAGE",
- "DEF:dropped=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:dropped:AVERAGE",
- "DEF:overlimits=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$qossettings{'CLASS'}_$qossettings{'DEV'}.rrd:overlimits:AVERAGE",
- "AREA:pkts$color:packets",
- "GPRINT:pkts:LAST:total packets\\:%8.3lf %s packets\\j",
- "LINE3:dropped#FF0000:dropped",
- "GPRINT:dropped:LAST:dropped packets\\:%8.3lf %s packets\\j",
- "LINE3:overlimits#0000FF:overlimits",
- "GPRINT:overlimits:LAST:overlimits\\:%8.3lf %s packets\\j",
- );
-}
-
-
-sub overviewgraph {
- $qossettings{'DEV'} = shift;
- if ( $qossettings{'DEV'} eq $qossettings{'RED_DEV'} ) {
- $qossettings{'CLASSPRFX'} = '1';
- } else {
- $qossettings{'CLASSPRFX'} = '2';
- }
- my $ERROR="";
- my $count="1";
- my $color="#000000";
- my @command=("/srv/web/ipfire/html/graphs/qos-graph-$qossettings{'DEV'}.png",
- "--start", "-3240", "-aPNG", "-i", "-z",
- "--alt-y-grid", "-w 600", "-h 150", "-r",
- "--color", "SHADEA#EAE9EE",
- "--color", "SHADEB#EAE9EE",
- "--color", "BACK#FFFFFF",
- "-t Auslastung auf ($qossettings{'DEV'})"
- );
- open( FILE, "< $classfile" ) or die "Unable to read $classfile";
- @classes = <FILE>;
- close FILE;
- foreach $classentry (sort @classes)
- {
- @classline = split( /\;/, $classentry );
- if ( $classline[0] eq $qossettings{'DEV'} )
- {
- $color=random_hex_color(6);
- push(@command, "DEF:$classline[1]=/var/log/rrd/class_$qossettings{'CLASSPRFX'}-$classline[1]_$qossettings{'DEV'}.rrd:bits:AVERAGE");
-
- if ($count eq "1") {
- push(@command, "AREA:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
- } else {
- push(@command, "STACK:$classline[1]$color:Klasse $classline[1] - $classline[8]\\j");
- }
- $count++;
- }
- }
- RRDs::graph (@command);
-}
-
-sub random_hex_color {
- my $size = shift;
- $size = 6 if $size !~ /^3|6$/;
- my @hex = ( 0 .. 9, 'a' .. 'f' );
- my @color;
- push @color, @hex[rand(@hex)] for 1 .. $size;
- return join('', '#', @color);
-}
+++ /dev/null
-#!/usr/bin/perl
-
-#
-# redirect.cgi - By IPFire-Team (C)
-#
-
-use CGI qw(param);
-
-$swroot="/var/ipfire";
-
-my %netsettings;
-my %filtersettings;
-
-&readhash("$swroot/ethernet/settings", \%netsettings);
-&readhash("$swroot/urlfilter/settings", \%filtersettings);
-
-$category=param("category");
-$url=param("url");
-$ip=param("ip");
-
-if ($filtersettings{'MSG_TEXT_1'} eq '') {
- $msgtext1 = "A C C E S S D E N I E D";
-} else { $msgtext1 = $filtersettings{'MSG_TEXT_1'}; }
-if ($filtersettings{'MSG_TEXT_2'} eq '') {
- $msgtext2 = "Access to the requested page has been denied";
-} else { $msgtext2 = $filtersettings{'MSG_TEXT_2'}; }
-if ($filtersettings{'MSG_TEXT_3'} eq '') {
- $msgtext3 = "Please contact the Network Administrator if you think there has been an error";
-} else { $msgtext3 = $filtersettings{'MSG_TEXT_3'}; }
-
-if ($category eq '') { $category = ' '; } else { $category = '['.$category.']'; }
-
-print "Pragma: no-cache\n";
-print "Cache-control: no-cache\n";
-print "Connection: close\n";
-print "Content-type: text/html\n\n";
-
-print <<END
-
-<html>
-<head>
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
-<title>ACCESS MESSAGE</title>
-</head>
-
-<body>
-<table width="100%" height='100%' border="0">
-<tr>
- <td colspan='3' width='100%' height='130' align="center" background="http://$netsettings{'GREEN_ADDRESS'}:81/images/background.gif">
-<tr> <td width='10%'><td align='center' bgcolor='#CC000000' width='80%'><font face="verdana, arial, sans serif" color="#FFFFFF" size="5">
- <b>$msgtext1</b>
- </font>
- <td width='10%'>
-END
-;
-
-if (!($category eq ""))
-{
- print <<END
- <tr> <td colspan='3' align='center'>
- <font face="verdana, arial, sans serif" color="#CC000000" size="1">
- <b>$category</b>
- </font>
-END
-;
-}
-print <<END
-<tr>
- <td colspan='3' align="center">
- <font face="verdana, arial, sans serif" color="#000000" size="4">
- <b>$msgtext2</b>
- </font>
- <font face="verdana,arial,sans serif" color="#000000" size="2">
-END
-;
-
-if (!($url eq ""))
-{
-print <<END
- <p>URL: <a href="$url">$url</a>
-END
-;
-}
-
-if (!($ip eq ""))
-{
-print <<END
- <p>Client IP address: <i>$ip</i>
-END
-;
-}
-
-print <<END
- <br><p>$msgtext3
- </font>
-
-<tr>
- <td colspan='3' height='60%' valign="bottom" align="right">
- <font face="verdana,arial,sans serif" color="#656565" size="1">Web Filtering by
- </font>
- <a href="http://www.ipfire.eu" target="_blank"><b>
- <font face="verdana,arial,sans serif" color="#656565" size="1">IPFire</b></a>
- </font>
-
-</table>
-</body>
-
-</html>
-END
-;
-
-sub readhash
-{
- my $filename = $_[0];
- my $hash = $_[1];
- my ($var, $val);
-
- if (-e $filename)
- {
- open(FILE, $filename) or die "Unable to read file $filename";
- while (<FILE>)
- {
- chop;
- ($var, $val) = split /=/, $_, 2;
- if ($var)
- {
- $val =~ s/^\'//g;
- $val =~ s/\'$//g;
-
- # Untaint variables read from hash
- $var =~ /([A-Za-z0-9_-]*)/; $var = $1;
- $val =~ /([\w\W]*)/; $val = $1;
- $hash->{$var} = $val;
- }
- }
- close FILE;
- }
-}
'ovpnsys log' => 'OVPN-System-Log',
'package failed to install' => 'Programmpaket konnte nicht installiert werden.',
'pagerefresh' => 'Seite wird aktualisiert. Bitte warten.',
+'pakfire accept all' => 'Möchten Sie der Installation aller Pakete zustimmen?',
'pakfire configuration' => 'Pakfire Konfiguration',
+'pakfire install package' => 'Sie möchten folgende Pakete installieren: ',
+'pakfire installed addons' => 'Installierte Addons:',
+'pakfire possible dependency' => ' Möglicherweise haben diese Pakete Abhängigkeiten, d.h. andere Pakete müssen zusätzlich installiert werden. Dazu sehen sie unten eine Liste.',
+'pakfire register' => 'Registrierung am Master-Server:',
+'pakfire update daily' => 'Automatische Updates täglich ausführen:',
+'pakfire updates' => 'Zur Verfügung stehende Updates:',
+'pakfire working' => 'Pakfire führt gerade eine Aufgabe aus... Bitte warten sie, bis diese erfolgreich beendet wurde.',
'pap or chap' => 'PAP oder CHAP',
'password' => 'Passwort:',
'password contains illegal characters' => 'Passwort enthält ungültige(s) Zeichen.',
'backup key info' => 'IPFire restricts access to the backup key, thus you must know root password. You have possibility to protect this key outside of IPFire with a password.',
'backup media info' => 'Floppy and/or unformatted media may display stranges partitions sizes. In this case, select the whole device. Remenber to mount harddisk before removing device. Note: floppy created here are not usable with IPFire installer program!',
'backup missing key' => 'Need the backup key to restore a set',
+'backup password' => 'Backup password',
'backup protect key password' => 'Backup key password',
'backup sets' => 'Backup Sets',
'backup to floppy' => 'Backup to floppy',
'backupprofile' => 'In case reconnection fails, switch to profile',
'backups' => 'backups',
+'bad characters in' => 'Bad characters in ',
'bad characters in script field' => 'Bad characters in script field',
'bad characters in the telephone number field' => 'Bad characters in the telephone number field.',
'bad destination range' => 'The Destination port range has a first value that is greater than or equal to the second value.',
'bleeding rules' => 'Bleeding Edge Snort Rules',
'blue' => 'BLUE',
'blue access' => 'Blue Access',
+'blue access use hint' => 'You have to enter the MAC or the IP Adress for a device. To enter both is also possible',
'blue interface' => 'Blue Interface',
'broadcast' => 'Broadcast',
'broken pipe' => 'Broken pipe',
'connscheduler' => 'Connection Scheduler',
'could not be opened' => 'could not be opened',
'could not connect to' => 'Could not connect to',
+'could not connect to www ipcop org' => 'Could not connect to www.ipcop.org',
'could not connect to www ipfire org' => 'Could not connect to www.ipfire.org',
'could not create directory' => 'Could not create directory.',
'could not download latest patch list' => 'Could not download latest patch list (not connected).',
'cpu usage per' => 'CPU Usage per',
'create' => 'Create',
'create mask' => 'UNIX rights for new created files',
+'create new backup' => 'Create a new backup set',
'credits' => 'Credits',
'crl' => 'Certificate Revocation List',
'cron server' => 'CRON server',
'day before' => 'Day before',
'days' => 'days',
'dbfile' => 'Dbfile',
+'ddns help dnsmadeeasy' => 'In the field for hostname enter your ID (or a list of IDs seperated by;)',
+'ddns help freedns' => 'In the fied Username enter your Connect String',
+'ddns help plus' => '<b>+</b> marks a mandatory field',
'ddns hostname added' => 'Dynamic DNS hostname added',
'ddns hostname modified' => 'Dynamic DNS hostname modified',
'ddns hostname removed' => 'Dynamic DNS hostname removed',
'dhcp advopt unknown' => 'DHCP Option name not recognized',
'dhcp advopt value' => 'Option value',
'dhcp allow bootp' => 'Allow bootp clients',
+'dhcp base ip fixed lease' => 'Base IP for creating fix leases',
'dhcp bootp pxe data' => 'Enter optional bootp pxe data for this fixed lease',
'dhcp configuration' => 'DHCP configuration',
+'dhcp create fixed leases' => 'Create fixed leases',
+'dhcp fixed lease err1' => 'For a fix lease you have to enter the MAC adress or the hostname, or you enter both.',
+'dhcp fixed lease help1' => 'IP Adresses might be entered as FQDN',
'dhcp mode' => 'DHCP',
'dhcp server' => 'DHCP Server',
'dhcp server disabled' => 'DHCP server disabled. Stopped.',
'dmzpinholes for same net not necessary' => 'DMZ Pinholes are not necessary for same net. Select different source or destination net.',
'dns check failed' => 'DNS check failed',
'dns proxy server' => 'DNS proxy server',
+'dns server' => 'DNS Server',
'do not log this port list' => 'Drop this port list just before they are logged (reduces log size)',
'dod' => 'Dial on Demand',
'dod for dns' => 'Dial on Demand for DNS:',
'encrypted' => 'Encrypted',
'end address' => 'End address:',
'err bk 1' => 'Error creating archive',
+'err bk 10 password' => 'Error with Backup Password',
'err bk 2 key' => 'Error creating key file',
'err bk 3 tar' => 'Error appending files to archive',
'err bk 4 gz' => 'Error compressing archive',
'options fw' => 'Firewall options',
'optionsfw portlist hint' => 'The list of ports has to be comma separated (e.g. 137,138). You can specify up to a maximum of 15 ports per protocol.',
'optionsfw warning' => 'Modifying these options implies restart of firewall',
+'or' => 'or',
'orange' => 'ORANGE',
'organization cant be empty' => 'Organization can\'t be empty.',
'organization name' => 'Organization Name',
'ovpnsys log' => 'OVPN-System-Log',
'package failed to install' => 'Package failed to install.',
'pagerefresh' => 'Page is beeing refreshed, please wait.',
+'pakfire accept all' => 'Do you want to install all packages?',
'pakfire configuration' => 'Pakfire Configuration',
+'pakfire install package' => 'You want ti install the following packages: ',
+'pakfire installed addons' => 'Installed Addons:',
+'pakfire possible dependency' => ' There may be depending packages, here is a list of packages that need to be installed.',
+'pakfire register' => 'Register at master server:',
+'pakfire update daily' => 'Run automatic Update daily:',
+'pakfire updates' => 'Available Update:',
+'pakfire working' => 'Pakfire ist working ... Please wait until everything is done successfull.',
'pap or chap' => 'PAP or CHAP',
'password' => 'Password:',
'password contains illegal characters' => 'Password contains illegal characters.',
+'password crypting key' => 'Password crypting the key',
'password not set' => 'Password not set.',
'password too short' => 'Password is too short.',
'passwords do not match' => 'Passwords do not match.',
'proxy access graphs' => 'Proxy access graphs',
'proxy log viewer' => 'Proxy log viewer',
'proxy logs' => 'Proxy Logs',
+'proxy no proxy extend' => 'or specify a list of not proxied destination',
+'proxy no proxy local' => 'Disallow local proxying on blue/green networks',
'proxy port' => 'Proxy Port',
'psk' => 'PSK',
'pulse' => 'Pulse',
'remote logging' => 'Remote logging',
'remote subnet' => 'Remote subnet:',
'remote subnet is invalid' => 'Remote subnet is invalid.',
+'removable device advice' => 'Plug in a device, refresh, select and mount before usage. Umount before removal.',
'remove' => 'Remove',
'remove ca certificate' => 'Remove CA Certificate',
'remove x509' => 'remove x509',
'reverse sort' => 'Sort in reverse chronological order',
'root' => 'Root',
'root certificate' => 'Root Certificate',
+'root path' => 'root path',
'root user password' => 'root password',
'route subnet is invalid' => 'Additional push route subnet is invalid',
'router ip' => 'Router IP Address:',
'rsvd src port overlap' => 'Source Port Range overlaps a port reserved for IPFire:',
'rules already up to date' => 'Rules already up to date',
'running' => 'RUNNING',
+'safe removal of umounted device' => 'You can safely remove the unmounted device',
'samba' => 'Samba',
'samba status' => 'Samba Status',
'saturday' => 'Saturday',
'security options' => 'Security Options',
'select' => 'Select',
'select dest net' => 'Select a destination net.',
+'select media' => 'Select media <br />(only FAT supported for removable media)',
'select source net' => 'Select a source net. If you have no Orange or Blue net configured, you need no DMZ Pinholes.',
'selecttraffic' => 'Select utilization-overview:',
'send cr' => 'ISP requires Carriage Return:',
'speaker on' => 'Speaker on:',
'squid extension methods' => 'Your <tt>extension_methods</tt> list',
'squid extension methods invalid' => 'Your \'extension_methods\' list can only contain uppercase words of letters and digits, separated with a space. ',
+'squid fix cache' => 'Repair cache',
'src port' => 'Src Port',
'srcprt range overlaps' => 'Source port range overlaps an already defined port.',
'srcprt within existing' => 'Source port is within an already defined port range.',
'ssdmz pinholes' => 'DMZ Pinholes',
'ssh access' => 'SSH Access',
+'ssh access tip' => 'IPFire SSH is not using default port 222!',
'ssh fingerprint' => 'Fingerprint',
'ssh host keys' => 'SSH Host Keys',
'ssh is disabled' => 'SSH is disabled. Stopping.',
'toggle enable disable' => 'Enable or Disable',
'tone' => 'Tone',
'tone dial' => 'Tone dial:',
+'too long 80 char max' => ' is too long, maximum allowed is 80 characters',
'total hits for log section' => 'Total Hits for Log Section',
'traffic back' => 'Back',
'traffic calc time' => 'Time of calculation',
'tripwirewarningpolicy' => 'WARNING - Your policy will be rebuild, after that your database will be reinitalised. Therefor the Site-Key and the Local-Ley are neeeded.',
'tuesday' => 'Tuesday',
'type' => 'type',
+'umount' => 'Umount',
+'umount removable media before to unplug' => 'Umount removable media before unplugging the device',
'unable to alter profiles while red is active' => 'Unable to alter profiles while RED is active.',
'unable to contact' => 'Unable to contact',
'unencrypted' => 'Unencrypted',
'workgroup' => 'Workgroup',
'written sectors' => 'Written Sectors',
'xtaccess all error' => 'You cannot set an external access to ALL, that is done in the port forwarding record.',
+'xtaccess bad transfert' => 'If you specify a port destination range, the source range must be identical !',
'year' => 'Year',
'yearly firewallhits' => 'yearly firewallhits',
'yes' => 'Yes',
fprintf (stderr, "Bad Argument!\n");
exit (1);
}
- elsif (strstr(argv[i], "|")){
+ else if (strstr(argv[i], "|")){
fprintf (stderr, "Bad Argument!\n");
exit (1);
}
- elsif (argc > 2){
+ else if (argc > 2){
fprintf (stderr, "Too Many Arguments!\n");
exit (1);
}
snprintf(command, STRING_SIZE, "/var/ipfire/mpfire/bin/mpfire.pl");
for (i = 1; i < argc; i++) {
- if (strstr(argv[i], "&&")){
- fprintf (stderr, "Bad Argument!\n");
- exit (1);
- }
- if (strstr(argv[i], "|")){
+ if (strstr(argv[i], "&&")){
+ fprintf (stderr, "Bad Argument!\n");
+ exit (1);
+ }
+ else if (strstr(argv[i], "|")){
fprintf (stderr, "Bad Argument!\n");
exit (1);
}
fprintf (stderr, "Missing smbctrl command!\n");
return 1;
}
-elsif (strcmp(argv[1], "smbuserdisable")==0)
+else if (strcmp(argv[1], "smbuserdisable")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/bin/smbpasswd -d %s >/dev/null", argv[2]);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbuserenable")==0)
+else if (strcmp(argv[1], "smbuserenable")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/bin/smbpasswd -e %s >/dev/null", argv[2]);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbuserdelete")==0)
+else if (strcmp(argv[1], "smbuserdelete")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/bin/smbpasswd -x %s >/dev/null", argv[2]);
safe_system(command);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbsafeconf")==0)
+else if (strcmp(argv[1], "smbsafeconf")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf");
return 0;
}
-elsif (strcmp(argv[1], "smbsafeconfcups")==0)
+else if (strcmp(argv[1], "smbsafeconfcups")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/shares /var/ipfire/samba/printer > /var/ipfire/samba/smb.conf");
return 0;
}
-elsif (strcmp(argv[1], "smbsafeconfpdc")==0)
+else if (strcmp(argv[1], "smbsafeconfpdc")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/pdc /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf");
return 0;
}
-elsif (strcmp(argv[1], "smbsafeconfpdccups")==0)
+else if (strcmp(argv[1], "smbsafeconfpdccups")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/pdc /var/ipfire/samba/shares /var/ipfire/samba/printer > /var/ipfire/samba/smb.conf");
return 0;
}
-elsif (strcmp(argv[1], "smbglobalreset")==0)
+else if (strcmp(argv[1], "smbglobalreset")==0)
{
safe_system("/bin/cat /var/ipfire/samba/default.global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf");
safe_system("/bin/cat /var/ipfire/samba/default.settings > /var/ipfire/samba/settings");
safe_system("/bin/cat /var/ipfire/samba/default.pdc > /var/ipfire/samba/pdc");
return 0;
}
-elsif (strcmp(argv[1], "smbsharesreset")==0)
+else if (strcmp(argv[1], "smbsharesreset")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/default.shares > /var/ipfire/samba/smb.conf");
safe_system("/bin/cat /var/ipfire/samba/default.shares > /var/ipfire/samba/shares");
return 0;
}
-elsif (strcmp(argv[1], "smbprinterreset")==0)
+else if (strcmp(argv[1], "smbprinterreset")==0)
{
safe_system("/bin/cat /var/ipfire/samba/global /var/ipfire/samba/shares /var/default.printer > /var/ipfire/samba/smb.conf");
safe_system("/bin/cat /var/ipfire/samba/default.printer > /var/ipfire/samba/printer");
return 0;
}
-elsif (strcmp(argv[1], "smbstop")==0)
+else if (strcmp(argv[1], "smbstop")==0)
{
safe_system("/etc/rc.d/init.d/samba stop >/dev/null");
safe_system("/usr/local/bin/sambactrl disable");
return 0;
}
-elsif (strcmp(argv[1], "smbstart")==0)
+else if (strcmp(argv[1], "smbstart")==0)
{
safe_system("/etc/rc.d/init.d/samba start >/dev/null");
safe_system("/usr/local/bin/sambactrl enable");
return 0;
}
-elsif (strcmp(argv[1], "smbrestart")==0)
+else if (strcmp(argv[1], "smbrestart")==0)
{
safe_system("/etc/rc.d/init.d/samba restart >/dev/null");
return 0;
}
-elsif (strcmp(argv[1], "smbreload")==0)
+else if (strcmp(argv[1], "smbreload")==0)
{
safe_system("/etc/rc.d/init.d/samba reload >/dev/null");
return 0;
}
-elsif (strcmp(argv[1], "smbstatus")==0)
+else if (strcmp(argv[1], "smbstatus")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/bin/smbstatus 2>/dev/null");
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbuseradd")==0)
+else if (strcmp(argv[1], "smbuseradd")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/groupadd sambauser >/dev/null");
safe_system(command);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbpcadd")==0)
+else if (strcmp(argv[1], "smbpcadd")==0)
{
snprintf(command, BUFFER_SIZE-1, "/usr/sbin/groupadd sambawks >/dev/null");
safe_system(command);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "smbchangepw")==0)
+else if (strcmp(argv[1], "smbchangepw")==0)
{
snprintf(command, BUFFER_SIZE-1, "echo %s:%s | chpasswd", argv[2], argv[3]);
safe_system(command);
safe_system(command);
return 0;
}
-elsif (strcmp(argv[1], "readsmbpasswd")==0)
+else if (strcmp(argv[1], "readsmbpasswd")==0)
{
safe_system("/bin/chown root:nobody /var/ipfire/samba/private >/dev/null");
safe_system("/bin/chown root:nobody /var/ipfire/samba/private/smbpasswd >/dev/null");
safe_system("/bin/chmod 650 /var/ipfire/samba/private >/dev/null");
return 0;
}
-elsif (strcmp(argv[1], "locksmbpasswd")==0)
+else if (strcmp(argv[1], "locksmbpasswd")==0)
{
safe_system("/bin/chown root:root /var/ipfire/samba/private >/dev/null");
safe_system("/bin/chown root:root /var/ipfire/samba/private/smbpasswd >/dev/null");
safe_system("/bin/chmod 600 /var/ipfire/samba/private >/dev/null");
return 0;
}
-elsif (strcmp(argv[1], "enable")==0)
+else if (strcmp(argv[1], "enable")==0)
{
safe_system("touch /var/ipfire/samba/enable");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc3.d/S45samba");
safe_system("ln -snf /etc/rc.d/init.d/samba /etc/rc.d/rc6.d/K48samba");
return 0;
}
-elsif (strcmp(argv[1], "disable")==0)
+else if (strcmp(argv[1], "disable")==0)
{
safe_system("unlink /var/ipfire/samba/enable");
safe_system("rm -rf /etc/rc.d/rc*.d/*samba");