+
+
END
;
&Header::closebox();
@@ -174,65 +214,83 @@ END
&Header::openbox('100%', 'center', 'Shares');
print <
- | Name der Freigabe | Pfad | Optionen
+
+
+ | Name der Freigabe | Pfad | Optionen
END
;
- open( FILE, "< $sharefile" ) or die "Unable to read $sharefile";
- @shares = ;
- close FILE;
- foreach $shareentry (sort @shares)
- {
- @shareline = split( /\;/, $shareentry );
- print <| $shareline[0]
- | $shareline[2]
- |
-
+ open( FILE, "< $sharefile" ) or die "Unable to read $sharefile";
+ @shares = ;
+ close FILE;
+ foreach $shareentry (sort @shares)
+ {
+ @shareline = split( /\;/, $shareentry );
+ print <| $shareline[0]
+ | $shareline[2]
+ |
+
END
;
- if ($shareline[1] eq 'enabled') {
- print <
+ if ($shareline[1] eq 'enabled') {
+ print <
END
;
- } elsif ($shareline[1] eq 'disabled') {
- print <
+ } elsif ($shareline[1] eq 'disabled') {
+ print <
END
;
- }
- print <
- |
- |
+ }
+ print <
+
+ | |
END
;
- }
- print <Legende: Freigabe bearbeiten | Freigabe loeschen
- | | |
|---|
+ }
+ print <Legende: Freigabe bearbeiten | Freigabe loeschen
+
END
;
&Header::closebox();
+
+if ($sambasettings{'SECURITY'} eq 'user')
+{
+&Header::openbox('100%', 'center', 'User');
+
+print <
+
+END
+;
+
+&Header::closebox();
+}
+
&Header::closebigbox();
&Header::closepage();
@@ -241,34 +299,33 @@ END
sub isrunning
{
- my $cmd = $_[0];
- my $status = "$Lang::tr{'stopped'} | ";
- my $pid = '';
- my $testcmd = '';
- my $exename;
+ my $cmd = $_[0];
+ my $status = "$Lang::tr{'stopped'} | ";
+ my $pid = '';
+ my $testcmd = '';
+ my $exename;
- $cmd =~ /(^[a-z]+)/;
- $exename = $1;
+ $cmd =~ /(^[a-z]+)/;
+ $exename = $1;
- if (open(FILE, "/var/run/${cmd}.pid"))
- {
- $pid = ; chomp $pid;
- close FILE;
- if (open(FILE, "/proc/${pid}/status"))
- {
- while ()
- {
- if (/^Name:\W+(.*)/) {
- $testcmd = $1; }
- }
- close FILE;
- if ($testcmd =~ /$exename/)
- {
- $status = "$Lang::tr{'running'} | ";
- }
- }
- }
+ if (open(FILE, "/var/run/${cmd}.pid"))
+ {
+ $pid = ; chomp $pid;
+ close FILE;
+ if (open(FILE, "/proc/${pid}/status"))
+ {
+ while ()
+ {
+ if (/^Name:\W+(.*)/) {
+ $testcmd = $1; }
+ }
+ close FILE;
+ if ($testcmd =~ /$exename/)
+ {
+ $status = "$Lang::tr{'running'} | ";
+ }
+ }
+ }
- return $status;
+ return $status;
}
-
diff --git a/html/cgi-bin/upnp.cgi b/html/cgi-bin/upnp.cgi
new file mode 100644
index 000000000..4623d72c2
--- /dev/null
+++ b/html/cgi-bin/upnp.cgi
@@ -0,0 +1,181 @@
+#!/usr/bin/perl
+#
+# IPFire CGIs
+#
+# This code is distributed under the terms of the GPL
+#
+# (c) The IPFire 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";
+
+my %upnpsettings = ();
+my %checked = ();
+my %netsettings = ();
+my $message = "";
+my $errormessage = "";
+my %selected= () ;
+&General::readhash("${General::swroot}/ethernet/settings", \%netsettings);
+
+my %servicenames =
+(
+ 'UPnP Daemon' => 'upnpd',
+);
+
+&Header::showhttpheaders();
+
+$upnpsettings{'ENABLED'} = 'off';
+$upnpsettings{'GREEN'} = 'on';
+$upnpsettings{'BLUE'} = 'off';
+### Values that have to be initialized
+$upnpsettings{'ACTION'} = '';
+
+&General::readhash("${General::swroot}/upnp/settings", \%upnpsettings);
+&Header::getcgihash(\%upnpsettings);
+
+&Header::openpage('UPnP', 1, '');
+&Header::openbigbox('100%', 'left', '', $errormessage);
+
+############################################################################################################################
+############################################################################################################################
+
+if ($upnpsettings{'ACTION'} eq $Lang::tr{'save'})
+{
+ &General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
+}
+elsif ($upnpsettings{'ACTION'} eq 'Start')
+{
+ $upnpsettings{'ENABLED'} = 'on';
+ &General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
+ system('/usr/local/bin/upnpctrl start');
+}
+elsif ($upnpsettings{'ACTION'} eq 'Stop')
+{
+ $upnpsettings{'ENABLED'} = 'off';
+ &General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
+ system('/usr/local/bin/upnpctrl stop');
+}
+elsif ($upnpsettings{'ACTION'} eq $Lang::tr{'restart'})
+{
+ &General::writehash("${General::swroot}/upnp/settings", \%upnpsettings);
+ system('/usr/local/bin/upnpctrl restart');
+}
+
+&General::readhash("${General::swroot}/upnp/settings", \%upnpsettings);
+
+if ($errormessage) {
+ &Header::openbox('100%', 'left', $Lang::tr{'error messages'});
+ print "$errormessage\n";
+ print " \n";
+ &Header::closebox();
+}
+
+$checked{'GREEN'}{'on'} = '';
+$checked{'GREEN'}{'off'} = '';
+$checked{'GREEN'}{"$upnpsettings{'GREEN'}"} = 'checked';
+$checked{'BLUE'}{'on'} = '';
+$checked{'BLUE'}{'off'} = '';
+$checked{'BLUE'}{"$upnpsettings{'BLUE'}"} = 'checked';
+
+############################################################################################################################
+############################################################################################################################
+
+&Header::openbox('100%', 'center', 'UPnP');
+print <
+
+
+
+
+END
+;
+&Header::closebox();
+
+&Header::closebigbox();
+&Header::closepage();
+
+############################################################################################################################
+############################################################################################################################
+
+sub isrunning
+{
+ my $cmd = $_[0];
+ my $status = "$Lang::tr{'stopped'} | ";
+ my $pid = '';
+ my $testcmd = '';
+ my $exename;
+
+ $cmd =~ /(^[a-z]+)/;
+ $exename = $1;
+
+ if (open(FILE, "/var/run/${cmd}.pid"))
+ {
+ $pid = ; chomp $pid;
+ close FILE;
+ if (open(FILE, "/proc/${pid}/status"))
+ {
+ while ()
+ {
+ if (/^Name:\W+(.*)/) {
+ $testcmd = $1; }
+ }
+ close FILE;
+ if ($testcmd =~ /$exename/)
+ {
+ $status = "$Lang::tr{'running'} | ";
+ }
+ }
+ }
+
+ return $status;
+}
+
diff --git a/lfs/cdrom b/lfs/cdrom
index 33fc9a8a7..6f14c9ec2 100644
--- a/lfs/cdrom
+++ b/lfs/cdrom
@@ -54,10 +54,11 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
# Reason for this tar+untar+tar is removing of entries listed two or more in src/ROOTFILES
mkdir -p /install/cdrom/doc
find $(DIR_SRC)/config/rootfiles/common -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES
- find $(DIR_SRC)/config/rootfiles/ver_$(IPFVER) -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES
+ find $(DIR_SRC)/config/rootfiles/ver_$(ED) -maxdepth 1 -type f | xargs cat >> /tmp/ROOTFILES
tar -c -C / --files-from=/tmp/ROOTFILES \
-f /$(SNAME).tar --exclude='#*' --exclude='dev/pts/*' \
- --exclude='proc/*' --exclude='tmp/ROOTFILES'
+ --exclude='proc/*' --exclude='usr/src/ccache/*' --exclude='usr/src/cache/*' \
+ --exclude='tmp/ROOTFILES'
rm -f /tmp/ROOTFILES
tar -x -C /tmp -f /$(SNAME).tar
rm -f /$(SNAME).tar
@@ -86,4 +87,4 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
cp /usr/lib/syslinux/isolinux.bin /install/cdrom/boot/isolinux/isolinux.bin; \
cd /install/cdrom && mkisofs -J -r -V "$(NAME)_$(VERSION)" \
-b boot/isolinux/isolinux.bin -no-emul-boot -boot-load-size 4 -boot-info-table \
- -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(IPFVER).iso
+ -c boot/isolinux/boot.catalog . > /install/images/$(SNAME)-$(VERSION).$(MACHINE)-$(ED).iso
diff --git a/lfs/configroot b/lfs/configroot
index 2a33bc623..27c2abd90 100644
--- a/lfs/configroot
+++ b/lfs/configroot
@@ -54,7 +54,7 @@ $(TARGET) :
# Create all directories
for i in addon-lang alcatelusb auth backup ca certs cnx_pci connscheduler crls ddns dhcp dhcpc dmzholes \
eagle-usb eciadsl ethernet isdn key langs logging main mbmon modem net-traffic nfs optionsfw outgoing/bin patches pakfire portfw \
- ppp private proxy/advanced qos/bin red remote snort time urlfilter/autoupdate urlfilter/bin vpn wakeonlan wireless xtaccess ; do \
+ ppp private proxy/advanced qos/bin red remote snort time urlfilter/autoupdate urlfilter/bin upnp vpn wakeonlan wireless xtaccess ; do \
mkdir -p $(CONFIG_ROOT)/$$i; \
done
@@ -65,7 +65,7 @@ $(TARGET) :
isdn/settings main/hosts main/settings optionsfw/settings outgoing/settings outgoing/rules pakfire/settings \
portfw/config ppp/settings-1 ppp/settings-2 ppp/settings-3 ppp/settings-4 \
ppp/settings-5 ppp/settings proxy/settings proxy/advanced/settings remote/settings qos/settings qos/classes qos/subclasses qos/level7config qos/portconfig \
- qos/tosconfig snort/settings vpn/config vpn/settings vpn/ipsec.conf \
+ qos/tosconfig snort/settings upnp/settings vpn/config vpn/settings vpn/ipsec.conf \
vpn/ipsec.secrets vpn/caconfig wakeonlan/clients.conf wireless/config wireless/settings; do \
touch $(CONFIG_ROOT)/$$i; \
done
diff --git a/make.sh b/make.sh
index e383b0531..fed147e44 100644
--- a/make.sh
+++ b/make.sh
@@ -33,7 +33,7 @@ KVER=`grep --max-count=1 VER lfs/linux | awk '{ print $3 }'`
MACHINE=`uname -m`
SVN_REVISION=`svn info | grep Revision | cut -c 11-`
-IPFVER="full" # Which version should be compiled? (full|light|voice)
+IPFVER="full devel" # Which version should be compiled? (full|light|voice|devel)
# Set an information about the build number
if [ -e ./.svn ]; then
@@ -575,7 +575,10 @@ buildpackages() {
beautify message DONE
# Create images for install
- ipfiremake cdrom
+ for i in $IPFVER
+ do
+ ipfiremake cdrom ED=$i
+ done
ipfiremake pxe
cp -f $LFS/install/images/{*.iso,*.tgz} $BASEDIR >> $LOGFILE 2>&1
diff --git a/src/initscripts/init.d/applejuice b/src/initscripts/init.d/applejuice
index cdb0655dc..5ea1227b0 100644
--- a/src/initscripts/init.d/applejuice
+++ b/src/initscripts/init.d/applejuice
@@ -1,7 +1,7 @@
#!/bin/bash
HOME=/opt/applejuice
JAVA=/usr/bin/java
-. /var/ipfire/applejuice/settings
+eval $(/usr/local/bin/readhash /var/ipfire/applejuice/settings)
case "$1" in
diff --git a/src/initscripts/init.d/console b/src/initscripts/init.d/console
index 30f5bdfaf..cbf3aaf68 100644
--- a/src/initscripts/init.d/console
+++ b/src/initscripts/init.d/console
@@ -15,7 +15,7 @@
. /etc/sysconfig/rc
. ${rc_functions}
-. /var/ipfire/main/settings
+eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
FONT="lat0-16"
KEYMAP_CORRECTIONS="euro2"
diff --git a/src/initscripts/init.d/localnet b/src/initscripts/init.d/localnet
index a3b70162d..9f38f34dc 100644
--- a/src/initscripts/init.d/localnet
+++ b/src/initscripts/init.d/localnet
@@ -17,7 +17,7 @@
case "${1}" in
start)
- . /var/ipfire/main/settings
+ eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
boot_mesg "Bringing up the loopback interface..."
ip addr add 127.0.0.1/8 label lo dev lo
ip link set lo up
@@ -41,7 +41,7 @@ case "${1}" in
;;
status)
- . /var/ipfire/main/settings
+ eval $(/usr/local/bin/readhash /var/ipfire/main/settings)
echo "Hostname is: $(hostname)"
ip link show lo
;;
diff --git a/src/initscripts/init.d/network b/src/initscripts/init.d/network
index 9e2056f3a..6669b28a1 100644
--- a/src/initscripts/init.d/network
+++ b/src/initscripts/init.d/network
@@ -14,10 +14,10 @@
. /etc/sysconfig/rc
. ${rc_functions}
-. /var/ipfire/ethernet/settings
-. /var/ipfire/dhcp/settings
-. /var/ipfire/ppp/settings
-. /var/ipfire/vpn/settings
+eval $(/usr/local/bin/readhash /var/ipfire/ethernet/settings)
+eval $(/usr/local/bin/readhash /var/ipfire/dhcp/settings)
+eval $(/usr/local/bin/readhash /var/ipfire/ppp/settings)
+eval $(/usr/local/bin/readhash /var/ipfire/vpn/settings)
# This is a small wrapper for dhcpcd.exe
if ( echo $0 | /bin/grep -q 'dhcpcd.exe' ); then
diff --git a/src/initscripts/init.d/upnpd b/src/initscripts/init.d/upnpd
index 44201a385..ca05abf75 100644
--- a/src/initscripts/init.d/upnpd
+++ b/src/initscripts/init.d/upnpd
@@ -19,7 +19,7 @@
ALLOW_MULTICAST=no
# configuration
-. /var/ipfire/upnp/settings
+eval $(/usr/local/bin/readhash /var/ipfire/upnp/settings)
case "$1" in
start)
| |
|---|
|