From 5e773594ffedd503f864975b9a4aacb4bc6093bc Mon Sep 17 00:00:00 2001 From: ms Date: Sat, 2 Sep 2006 12:21:49 +0000 Subject: [PATCH] Geaendert: * redirect-Seite * Grub Savedefault und Bootoptionen * Pakfire - Fix Hinzugefuegt: * Samba.cgi - experimental git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@266 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8 --- config/grub/grub.conf | 34 ++--- config/grub/scsigrub.conf | 34 ++--- doc/ChangeLog | 4 + doc/packages-list.txt | 7 +- html/cgi-bin/samba.cgi | 274 +++++++++++++++++++++++++++++++++++ html/html/redirect.cgi | 76 +++------- lfs/clamav | 2 +- lfs/configroot | 2 +- lfs/grub | 1 + lfs/libogg | 2 +- lfs/libvorbis | 2 +- lfs/xampp | 2 +- lfs/xvid | 4 +- make.sh | 2 +- src/ROOTFILES.i386 | 1 + src/pakfire/lib/check_pak.sh | 7 +- 16 files changed, 342 insertions(+), 112 deletions(-) create mode 100644 html/cgi-bin/samba.cgi diff --git a/config/grub/grub.conf b/config/grub/grub.conf index 543f976552..9688b7cd4c 100644 --- a/config/grub/grub.conf +++ b/config/grub/grub.conf @@ -1,47 +1,35 @@ timeout 10 -#default saved +default saved foreground = 16064e background = ffffff gfxmenu /grub/message -#hiddenmenu -#splashimage (hd0,0)/grub/ipfire.xpm.gz title IPFire (1024x768) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 acpi=off vga=791 splash=silent ro + kernel /vmlinuz root=ROOT panic=10 vga=791 splash=silent ro initrd /initrd.splash - #savedefault + savedefault 0 title IPFire (640x480) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 acpi=off vga=785 splash=silent ro + kernel /vmlinuz root=ROOT panic=10 vga=785 splash=silent ro initrd /initrd.splash - #savedefault + savedefault 1 title IPFire SMP (1024x768) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 acpi=off vga=791 splash=silent ro initrd /initrd.splash - #savedefault + savedefault 2 title IPFire SMP (640x480) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 acpi=off vga=785 splash=silent ro initrd /initrd.splash - #savedefault -title IPFire (ACPI enabled) (1024x768) - root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 vga=791 splash=silent ro - initrd /initrd.splash - #savedefault -title IPFire (ACPI enabled) (640x480) - root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 vga=785 splash=silent ro - initrd /initrd.splash - #savedefault -title IPFire SMP (ACPI HT enabled) (1024x768) + savedefault 3 +title IPFire SMP (Intel Pentium 4) (1024x768) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=791 splash=silent ro initrd /initrd.splash - #savedefault -title IPFire SMP (ACPI HT enabled) (640x480) + savedefault 4 +title IPFire SMP (Intel Pentium 4) (640x480) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 acpi=ht vga=785 splash=silent ro initrd /initrd.splash - #savedefault + savedefault 5 diff --git a/config/grub/scsigrub.conf b/config/grub/scsigrub.conf index 9b20e03bd0..91d9f6da1d 100644 --- a/config/grub/scsigrub.conf +++ b/config/grub/scsigrub.conf @@ -1,47 +1,35 @@ timeout 10 -#default saved +default saved foreground = 16064e background = ffffff gfxmenu /grub/message -#hiddenmenu -#splashimage (hd0,0)/grub/ipfire.xpm.gz title IPFire (1024x768) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 init=/linuxrc acpi=off vga=791 splash=silent rw + kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=791 splash=silent rw initrd /ipfirerd.img - #savedefault + savedefault 0 title IPFire (640x480) root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 init=/linuxrc acpi=off vga=785 splash=silent rw + kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=785 splash=silent rw initrd /ipfirerd.img - #savedefault + savedefault 1 title IPFire SMP (1024x768) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=off vga=791 splash=silent rw initrd /ipfirerd-smp.img - #savedefault + savedefault 2 title IPFire SMP (640x480) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=off vga=785 splash=silent rw initrd /ipfirerd-smp.img - #savedefault -title IPFire (ACPI enabled) (1024x768) - root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=791 splash=silent rw - initrd /ipfirerd.img - #savedefault -title IPFire (ACPI enabled) (640x480) - root (hd0,0) - kernel /vmlinuz root=ROOT panic=10 init=/linuxrc vga=785 splash=silent rw - initrd /ipfirerd.img - #savedefault -title IPFire SMP (ACPI HT enabled) (1024x768) + savedefault 3 +title IPFire SMP (Intel Pentium 4) (1024x768) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=ht vga=791 splash=silent rw initrd /ipfirerd-smp.img - #savedefault -title IPFire SMP (ACPI HT enabled) (640x480) + savedefault 4 +title IPFire SMP (Intel Pentium 4) (640x480) root (hd0,0) kernel /vmlinuz-smp root=ROOT panic=10 init=/linuxrc acpi=ht vga=785 splash=silent rw initrd /ipfirerd-smp.img - #savedefault + savedefault 5 diff --git a/doc/ChangeLog b/doc/ChangeLog index ac7ac627db..4e0c7ba2ac 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,8 @@ ------------------------------------------------------------------------ +r265 | ms | 2006-08-30 20:56:53 +0200 (Wed, 30 Aug 2006) | 1 line + +Direkt ein Fix fuer eben genannte Sachen... +------------------------------------------------------------------------ r264 | ms | 2006-08-30 20:29:15 +0200 (Wed, 30 Aug 2006) | 3 lines Geaendert: diff --git a/doc/packages-list.txt b/doc/packages-list.txt index 9455b69221..d17c48195d 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -84,6 +84,7 @@ * fcpci-suse8.2-03.11.02 * fcron-2.0.2 * fetchmail-6.3.4 + * ffmpeg-20051126 * file-4.16 * findutils-4.1.20 * flex-2.5.4a @@ -112,7 +113,7 @@ * inetutils-1.4.2 * ipac-ng-1.31 * ipaddr-1.2 - * ipfire-logs-2006-08-28-21:09.tgz + * ipfire-logs-2006-08-30-01:11.tgz * iproute2-2.4.7-now-ss010824 * iptables-1.3.5 * iptraf-3.0.0 @@ -128,6 +129,7 @@ * lcms-1.15 * less-382 * libcap-1.10 + * libmad-0.15.1b * libmng-1.0.9 * libnet-1.1.2.1 * libogg-1.1.3 @@ -159,6 +161,7 @@ * mktemp-1.5 * mldonkey-2.7.7 * modutils-2.4.27 + * mpeg2dec-20050802 * mpg123-0.59r * mtools-3.9.9 * nagios-2.5 @@ -235,10 +238,12 @@ * util-linux-2.12r * vim-6.3 * vlan.1.9 + * vlc-0.8.5 * wget-1.10.2 * wput-0.6 * xampp-linux-1.5.3a * xinetd-2.3.14 * xmbmon205 + * xvidcore-1.1.0 * zaptel-1.2.7 * zlib-1.2.3 diff --git a/html/cgi-bin/samba.cgi b/html/cgi-bin/samba.cgi new file mode 100644 index 0000000000..ecdd2561db --- /dev/null +++ b/html/cgi-bin/samba.cgi @@ -0,0 +1,274 @@ +#!/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 %sambasettings = (); +my %checked = (); +my %netsettings = (); +my $message = ""; +my $errormessage = ""; +my $shareentry = ""; +my @shares = (); +my @shareline = (); +my @proto = (); +my %selected= () ; +my $sharefile = "/var/ipfire/samba/shares"; +&General::readhash("${General::swroot}/ethernet/settings", \%netsettings); + +my %servicenames = +( + 'SMB Daemon' => 'smbd', + 'NetBIOS Nameserver' => 'nmbd', + 'Winbind Daemon' => 'winbindd' +); + +&Header::showhttpheaders(); + +$sambasettings{'ENABLED'} = 'off'; +$sambasettings{'EDIT'} = 'no'; +$sambasettings{'VALID'} = 'yes'; +$sambasettings{'WORKGRP'} = 'homeip.net'; +$sambasettings{'NETBIOSNAME'} = 'IPFIRE'; +$sambasettings{'SRVSTRING'} = 'Samba Server %v running on IPFire 2.0'; +$sambasettings{'INTERFACES'} = ''; +$sambasettings{'SECURITY'} = 'share'; +$sambasettings{'OSLEVEL'} = '20'; +$sambasettings{'PDC'} = 'off'; +$sambasettings{'WINSSERV'} = ''; +$sambasettings{'WINS'} = 'off'; +### Values that have to be initialized +$sambasettings{'ACTION'} = ''; + +&General::readhash("${General::swroot}/samba/settings", \%sambasettings); +&Header::getcgihash(\%sambasettings); + +&Header::openpage('Samba', 1, ''); +&Header::openbigbox('100%', 'left', '', $errormessage); + +############################################################################################################################ +############################################################################################################################ + +if ($sambasettings{'ACTION'} eq $Lang::tr{'save'}) +{ + &General::writehash("${General::swroot}/samba/settings", \%sambasettings); +} + +&General::readhash("${General::swroot}/samba/settings", \%sambasettings); + +if ($errormessage) { + &Header::openbox('100%', 'left', $Lang::tr{'error messages'}); + print "$errormessage\n"; + print " \n"; + &Header::closebox(); +} + +$checked{'PDC'}{'on'} = ''; +$checked{'PDC'}{'off'} = ''; +$checked{'PDC'}{"$sambasettings{'PDC'}"} = 'checked'; +$checked{'WINS'}{'on'} = ''; +$checked{'WINS'}{'off'} = ''; +$checked{'WINS'}{"$sambasettings{'WINS'}"} = 'checked'; + +############################################################################################################################ +############################################################################################################################ + +&Header::openbox('100%', 'center', 'Samba'); +print < +END +; + if ( $message ne "" ) { + print "$message"; + } + + my $lines = 0; + my $key = ''; + foreach $key (sort keys %servicenames) + { + if ($lines % 2) { + print "\n"; } + else { + print "\n"; } + print "$key\n"; + my $shortname = $servicenames{$key}; + my $status = &isrunning($shortname); + print "$status\n"; + print <
+ + +
+END +; + print "\n"; + $lines++; + } + print < + Alle Dienste: + + + + + +
+
+ +
Basisoptionen +
Workgroup: +
NetBIOS-Name: +
Server-String: +
Interfaces:
Sicherheitsoptionen +
Security: + +
Browsingoptionen +
OS Level: +
Primary Domain Controller:on / + off + +
WINS-Optionen +
WINS-Server: +
WINS-Support:on / + off + +
+
+
+END +; +&Header::closebox(); + +&Header::openbox('100%', 'center', 'Shares'); + +print < + Name der FreigabePfadOptionen +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] + + +END +; + if ($shareline[1] eq 'enabled') { + print <
+ + + + +END +; + } elsif ($shareline[1] eq 'disabled') { + print <
+ + + + +END +; + } + print <
+ + + + +
+ + + +
+
+END +; + } + print <Legende:   Freigabe bearbeiten |  Freigabe loeschen   + +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/html/html/redirect.cgi b/html/html/redirect.cgi index 0be18ed2b3..6c78e31711 100644 --- a/html/html/redirect.cgi +++ b/html/html/redirect.cgi @@ -42,54 +42,37 @@ print < ACCESS MESSAGE + + + + +
+
+ $msgtext1 + + END ; -if (($filtersettings{'ENABLE_JPEG'} eq 'on') && (-e "/home/httpd/html/images/urlfilter/logo_ipfire.gif")) +if (!($category eq "")) { -print < -END -; -} else { -print < - + print < + + $category + END ; } - print < - - - - - - - - + IPFire +
- - INFO: $category - -
- - - - - - - - - -
- - $msgtext1 - -
- - $msgtext2 - - + + + $msgtext2 + + END ; @@ -112,29 +95,16 @@ END print <

$msgtext3 -

+ Web Filtering by - IPFire and - - SquidGuard - -
- - - - diff --git a/lfs/clamav b/lfs/clamav index 3eb67fe502..e1379d20a0 100644 --- a/lfs/clamav +++ b/lfs/clamav @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = clamav -PAK_VER = ipfire-beta1 +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/lfs/configroot b/lfs/configroot index 8c96282803..818c7eaa33 100644 --- a/lfs/configroot +++ b/lfs/configroot @@ -86,7 +86,7 @@ $(TARGET) : cp $(DIR_SRC)/config/cfgroot/nfs-server $(CONFIG_ROOT)/nfs/nfs-server cp $(DIR_SRC)/config/cfgroot/p2protocols $(CONFIG_ROOT)/outgoing/p2protocols cp $(DIR_SRC)/config/cfgroot/proxy-acl $(CONFIG_ROOT)/proxy/acl-1.4 - cp $(DIR_SRC)/config/qos/makeqosscripts.pl $(CONFIG_ROOT)/qos/bin/makeqosscripts.pl + cp $(DIR_SRC)/config/qos/* $(CONFIG_ROOT)/qos/bin/ cp $(DIR_SRC)/config/cfgroot/ssh-settings $(CONFIG_ROOT)/remote/settings cp $(DIR_SRC)/config/cfgroot/xtaccess-config $(CONFIG_ROOT)/xtaccess/config cp $(DIR_SRC)/config/cfgroot/time-settings $(CONFIG_ROOT)/time/settings diff --git a/lfs/grub b/lfs/grub index d0800523e6..50f415133a 100644 --- a/lfs/grub +++ b/lfs/grub @@ -139,6 +139,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects)) done install -m 0755 $(DIR_SRC)/src/install+setup/install/grubbatch /boot/grub + /usr/sbin/grub-set-default 0 @rm -rf $(DIR_APP) @$(POSTBUILD) diff --git a/lfs/libogg b/lfs/libogg index e88a0d1c07..d4b9ad4f87 100644 --- a/lfs/libogg +++ b/lfs/libogg @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = libogg -PAK_VER = ipfire-beta1 +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/lfs/libvorbis b/lfs/libvorbis index a98011b549..82165f3e7c 100644 --- a/lfs/libvorbis +++ b/lfs/libvorbis @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) PROG = libvorbis -PAK_VER = ipfire-beta1 +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/lfs/xampp b/lfs/xampp index 6ed5b7fa22..2e98283e73 100644 --- a/lfs/xampp +++ b/lfs/xampp @@ -34,7 +34,7 @@ DL_FROM = $(URL_IPFIRE) DIR_APP = /opt/lampp TARGET = $(DIR_INFO)/$(THISAPP) PROG = xampp -PAK_VER = ipfire-beta1 +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/lfs/xvid b/lfs/xvid index b7dbba9fff..1e03b30d25 100644 --- a/lfs/xvid +++ b/lfs/xvid @@ -33,8 +33,8 @@ DL_FILE = $(THISAPP).tar.bz2 DL_FROM = $(URL_IPFIRE) DIR_APP = $(DIR_SRC)/$(THISAPP) TARGET = $(DIR_INFO)/$(THISAPP) -PROG = postfix -PAK_VER = ipfire-beta1 +PROG = xvid +PAK_VER = 1 ############################################################################### # Top-level Rules diff --git a/make.sh b/make.sh index b466869422..e2cf36b9b9 100644 --- a/make.sh +++ b/make.sh @@ -867,7 +867,7 @@ buildpackages() { fi done cd $BASEDIR/packages; ls -w1 *.ipfire | awk -F ".ipfire" '{ print $1 }' > $BASEDIR/packages/packages_list.txt - echo "###EOF###" >> $BASEDIR/packages/packages_list.txt + echo -n "###EOF###" >> $BASEDIR/packages/packages_list.txt cd $PWD diff --git a/src/ROOTFILES.i386 b/src/ROOTFILES.i386 index 81dd37726b..d183ffd367 100644 --- a/src/ROOTFILES.i386 +++ b/src/ROOTFILES.i386 @@ -1268,6 +1268,7 @@ boot/grub/grubbatch boot/grub/ipfire.xpm.gz boot/grub/scsigrub.conf boot/grub/message +boot/grub/default #usr/bin/mbchk usr/sbin/grub usr/sbin/grub-install diff --git a/src/pakfire/lib/check_pak.sh b/src/pakfire/lib/check_pak.sh index 2339d6a204..3f5c0830ba 100644 --- a/src/pakfire/lib/check_pak.sh +++ b/src/pakfire/lib/check_pak.sh @@ -52,11 +52,10 @@ do vers=${vers%%_*} vers=${vers%% *} ipfver=${zeile#*_*} - # Testen ob aktuelle Verson schon installiert ist - # Erst alte Paket Vorschläge löschen /bin/rm -f $DB_DIR/${name} - /bin/echo "VER=${vers}" > $DB_DIR/${name} - /bin/echo "IPFVER=${ipfver}" >> $DB_DIR/${name} + /bin/echo -e VER=\"${vers}\" > $DB_DIR/${name} + /bin/echo -e IPFVER=\"${ipfver}\" >> $DB_DIR/${name} + cat $DB_DIR/${name} | tr -d "\015" > $DB_DIR/${name} done # Löschen der Hilfslisten -- 2.39.2