]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
Korrekturen damit der Build wieder laeuft
authorms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 16 Oct 2007 18:35:15 +0000 (18:35 +0000)
committerms <ms@ea5c0bd1-69bd-2848-81d8-4f18e57aeed8>
Tue, 16 Oct 2007 18:35:15 +0000 (18:35 +0000)
MPFire fix damit der shuffle funktioniert
Backup der Addons weiter gebaut

git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@975 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8

20 files changed:
config/backup/backup.pl
config/mpfire/mpfire.pl
config/rootfiles/packages/mpfire
config/rootfiles/packages/samba
doc/packages-list.txt
html/cgi-bin/backup.cgi
langs/de/cgi-bin/de.pl
langs/en/cgi-bin/en.pl
lfs/backup
lfs/mpfire
lfs/samba
make.sh
src/pakfire/lib/functions.sh
src/paks/default/install.sh
src/paks/default/uninstall.sh
src/paks/default/update.sh
src/paks/mpfire/install.sh
src/paks/mpfire/uninstall.sh
src/paks/mpfire/update.sh
tools/make-functions

index a9d7a1fdefea63f24da3101ba97e3ef9d1cc53dd..ff9eea5cea17de1243fd1e0f3a605910fa817cdb 100644 (file)
@@ -60,6 +60,9 @@ elsif ($ARGV[0] eq 'exclude') {
 elsif ($ARGV[0] eq 'restore') {
   system("cd / && tar -xvz --preserve -f /tmp/restore.ipf");
 }
+elsif ($ARGV[0] eq 'restoreaddon') {
+  system("cd / && tar -xvz --preserve -f /var/ipfire/backup/addons/backup/$ARGV[1].ipf");
+}
 elsif ($ARGV[0] eq 'cli') {
   system("tar -cvzf /var/ipfire/backup/$Jahr$Monat$Monatstag-$Stunden$Minuten-$ARGV[1].ipf --files-from='$ARGV[2]' --exclude-from='$ARGV[3]'");
 }
index 78d1aec34dd60ec4c9bfe9adddb89c68fc7be3fe..e72b2fcae65785bc867c391c4c5690d64a280130 100644 (file)
@@ -90,7 +90,7 @@ sub clearplaylist(){
   }
 
 sub shuffle(){
-  system("mpc shuffle >/dev/null");  
+  system("mpc random >/dev/null");  
   }
 
 sub checkplaylist(){
index 44b12b976fce0c0771727fbc50fd434e994d5c78..dc0ba428d31c1b6dbeba79a02254d99b6d730903 100644 (file)
@@ -1,5 +1,6 @@
 usr/local/bin/mpfirectrl
 srv/web/ipfire/cgi-bin/mpfire.cgi
+var/ipfire/backup/addons/include/mpfire
 var/ipfire/menu.d/EX-mpfire.menu
 var/ipfire/mpfire
 var/ipfire/mpfire/bin
index 6a09a922f16b623f054757a689df2014919114b1..35bc24b4072cddb93f4ee91676ed4b01fde608cb 100644 (file)
@@ -574,6 +574,7 @@ usr/sbin/winbindd
 #usr/share/samba/swat/using_samba/samba2_s.gif
 #usr/share/samba/swat/using_samba/samba2_xs.gif
 #usr/share/samba/swat/using_samba/toc.html
+var/ipfire/backup/addons/include/samba
 #var/ipfire/samba
 var/ipfire/samba/default.global
 var/ipfire/samba/default.pdc
index a33d4a0660efaf6bc62bd0d6bda44332d3a9802c..1e89c969b59f829dd950b79679b17041bdee8c35 100644 (file)
@@ -1,4 +1,4 @@
-== List of softwares used to build IPFire Version: 2.0rc1 ==
+== List of softwares used to build IPFire Version: 2.0rc2t ==
 * Archive-Tar-1.29
 * Archive-Zip-1.16
 * BerkeleyDB-0.27
@@ -20,7 +20,6 @@
 * MIME-tools-5.420
 * Mail-SpamAssassin-3.1.3
 * MailTools-1.74
-* MoBlock-0.8
 * Net-DNS-0.47
 * Net-IPv4Addr-0.10
 * Net-Server-0.93
 * libwww-perl-5.803
 * libxml2-2.6.26
 * libxslt-1.1.17
-* linux-2.6.16.54
+* linux-2.6.16.55
 * linux-atm-2.4.1
 * linux-libc-headers-2.6.12.0
 * linuxigd-0.95
 * reiserfsprogs-3.6.19
 * rp-pppoe-3.8
 * rrdtool-1.2.15
-* rsync-2.6.8
+* rsync-2.6.9
 * rtorrent-0.7.6
 * samba-3.0.26a
 * screen-4.0.3
index 252f5150357f93af7eca4a0cc0655b832f585de3..a0b2dcf1641d56415e1a7e8dfba4946c9df22e7d 100644 (file)
@@ -21,8 +21,8 @@
 
 use strict;
 # enable only the following on debugging purpose
-use warnings;
-use CGI::Carp 'fatalsToBrowser';
+#use warnings;
+#use CGI::Carp 'fatalsToBrowser';
 use File::Copy;
 
 require '/var/ipfire/general-functions.pl';
@@ -61,6 +61,15 @@ if ( $cgiparams{'ACTION'} eq "download" )
                print @fileholder;
                exit (0);
 }
+if ( $cgiparams{'ACTION'} eq "downloadaddon" )
+{
+               open(DLFILE, "</var/ipfire/backup/addons/backup/$cgiparams{'FILE'}") or die "Unable to open $cgiparams{'FILE'}: $!";
+               my @fileholder = <DLFILE>;
+               print "Content-Type:application/x-download\n";
+               print "Content-Disposition:attachment;filename=$cgiparams{'FILE'}\n\n";
+               print @fileholder;
+               exit (0);
+}
 elsif ( $cgiparams{'ACTION'} eq "restore" )
 {
                my $upload = $a->param("UPLOAD");
@@ -72,6 +81,18 @@ elsif ( $cgiparams{'ACTION'} eq "restore" )
                close UPLOADFILE;
                system("/usr/local/bin/backupctrl restore >/dev/null 2>&1");
 }
+elsif ( $cgiparams{'ACTION'} eq "restoreaddon" )
+{
+               my $upload = $a->param("UPLOAD");
+               open UPLOADFILE, ">/var/$cgiparams{'UPLOAD'}";
+               binmode $upload;
+               while ( <$upload> ) {
+               print UPLOADFILE;
+               }
+               close UPLOADFILE;
+               system("cp /var/ipfire/backup/addons/backup/$cgiparams{'UPLOAD'} /tmp/restore.ipf >/dev/null 2>&1");
+               system("/usr/local/bin/backupctrl restore >/dev/null 2>&1");
+}
 
 &Header::showhttpheaders();
 
@@ -90,7 +111,7 @@ if ( $cgiparams{'ACTION'} eq "backup" )
 }
 if ( $cgiparams{'ACTION'} eq "addonbackup" )
 {
-       system("/usr/local/bin/backupctrl addonbackup $cgiparams{'ADDON'}");
+       system("/usr/local/bin/backupctrl addonbackup $cgiparams{'ADDON'} >/dev/null 2>&1");
 }
 elsif ( $cgiparams{'ACTION'} eq "delete" )
 {
@@ -151,19 +172,6 @@ END
 ;
 &Header::closebox();
 
-############################################################################################################################
-####################################### Backups des Systems wiederherstellen ###############################################
-
-&Header::openbox('100%', 'center', $Lang::tr{'restore'});
-
-print <<END
-<table width='95%' cellspacing='0'>
-<tr><td align='left'>$Lang::tr{'backup'}</td><td align='left'><form method='post' enctype='multipart/form-data' action='$ENV{'SCRIPT_NAME'}'><input type="file" size='50' name="UPLOAD" /><input type='hidden' name='ACTION' value='restore' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'restore'}' title='$Lang::tr{'restore'}' src='/images/media-floppy.png' /></form></td></tr>
-</table>
-END
-;
-&Header::closebox();
-
 ############################################################################################################################
 ############################################# Backups von Addons erstellen #################################################
 
@@ -183,8 +191,8 @@ print "<tr><td align='center'>$Lang::tr{'backup from'} $_ $Lang::tr{'size'} $Siz
 print <<END
        <td align='right' width='5'>
                <form method='post' action='$ENV{'SCRIPT_NAME'}'>
-               <input type='hidden' name='ACTION' value='download' />
-               <input type='hidden' name='FILE' value='addons/backup/$_.ipf' />
+               <input type='hidden' name='ACTION' value='downloadaddon' />
+               <input type='hidden' name='FILE' value='$_.ipf' />
                <input type='image' alt='$Lang::tr{'download'}' title='$Lang::tr{'download'}' src='/images/package-x-generic.png' />
                </form>
        </td>
@@ -214,5 +222,20 @@ END
 }
 print "</table>";
 &Header::closebox();
+
+############################################################################################################################
+####################################### Backups des Systems wiederherstellen ###############################################
+
+&Header::openbox('100%', 'center', $Lang::tr{'restore'});
+
+print <<END
+<table width='95%' cellspacing='0'>
+<tr><td align='center' colspan='2'><font color='red'><br />$Lang::tr{'backupwarning'}</font><br /><br /></td></tr>
+<tr><td align='left'>$Lang::tr{'backup'}</td><td align='left'><form method='post' enctype='multipart/form-data' action='$ENV{'SCRIPT_NAME'}'><input type="file" size='50' name="UPLOAD" /><input type='hidden' name='ACTION' value='restore' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'restore'}' title='$Lang::tr{'restore'}' src='/images/media-floppy.png' /></form></td></tr>
+<tr><td align='left'>$Lang::tr{'backupaddon'}</td><td align='left'><form method='post' enctype='multipart/form-data' action='$ENV{'SCRIPT_NAME'}'><input type="file" size='50' name="UPLOAD" /><input type='hidden' name='ACTION' value='restoreaddon' /><input type='hidden' name='FILE' value='$_' /><input type='image' alt='$Lang::tr{'restore'}' title='$Lang::tr{'restore'}' src='/images/media-floppy.png' /></form></td></tr>
+</table>
+END
+;
+&Header::closebox();
 &Header::closebigbox();
 &Header::closepage();
index 1640fade48c09528bbcf2851d6e103bb0d4c9ff6..015efd010c27ad0e99115864e98dd20b935c88bf 100644 (file)
 'backup password' => 'Datensicherungs-Passwort',
 'backup sets' => 'Datensicherungssätze',
 'backup to floppy' => 'Datensicherung auf Diskette',
+'backupaddon' => 'Addonsicherung',
 'backupprofile' => 'Falls die Wiederverbindung scheitert, auf Profil umschalten',
 'backups' => 'Sicherungen',
+'backupwarning' => 'Bitte stellen Sie zuerst Ihre Hauptsicherung wieder her und anschließend die Addons. Achten Sie darauf, dass die Sicherungen ihre orginal Dateinamen behalten.',
 'bad characters in' => 'Ungültige Zeichen in ',
 'bad characters in script field' => 'Nicht erlaubte Zeichen im Skriptnamen',
 'bad characters in the telephone number field' => 'Nicht erlaubte(s) Zeichen im Feld Telefonnummer.',
index a5a0d079e0ed20fca6c1151e429ee4390182d7e5..6fad42a69aea987e3bf35b88d2b6cb8eafc0bf1a 100644 (file)
 'backup protect key password' => 'Backup key password',
 'backup sets' => 'Backup Sets',
 'backup to floppy' => 'Backup to floppy',
+'backupaddon' => 'Addon Backup',
 'backupprofile' => 'In case reconnection fails, switch to profile',
 'backups' => 'backups',
+'backupwarning' => 'Please first restore your main backup and after this your addon backups. Please keep the original filename, given when you download.',
 '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.',
index 12e958ed17f31eae70d95c15a37f5f5aee124edb..d11e7ea2c2e0b4871b8e8768f59b0f6e2bee4715 100644 (file)
@@ -60,4 +60,7 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        install -v -m 644 $(DIR_SRC)/config/backup/include /var/ipfire/backup/
        install -v -m 644 $(DIR_SRC)/config/backup/exclude /var/ipfire/backup/
        chown nobody:nobody -R /var/ipfire/backup/
+       -mkdir -p /var/ipfire/backup/addons
+       -mkdir -p /var/ipfire/backup/addons/include
+       -mkdir -p /var/ipfire/backup/addons/backup
        @$(POSTBUILD)
index c38128ab123d51fcabba2c375243ff48ba8c7ac6..b108a64dbe198501da52f60e363de0e0f60f2934 100644 (file)
@@ -67,4 +67,5 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        chown nobody.nobody /var/ipfire/mpfire/{settings,webradio}
        chown root.nobody /var/ipfire/mpfire/db/mpd.db
        chmod 664 /var/ipfire/mpfire/playlist.m3u
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/mpfire /var/ipfire/backup/addons/includes/mpfire
        @$(POSTBUILD)
index 95fd2e5b58172cc8b9e1afe75a8c50eb308c97ef..07aa53036f7f79e22b9e5d136fa39c7c4ba5a614 100644 (file)
--- a/lfs/samba
+++ b/lfs/samba
@@ -107,5 +107,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        cp -vfp /var/ipfire/samba/default.printer /var/ipfire/samba/printer
        cat /var/ipfire/samba/global /var/ipfire/samba/shares > /var/ipfire/samba/smb.conf
        -mkdir -p /var/log/samba
+       install -v -m 644 $(DIR_SRC)/config/backup/includes/samba /var/ipfire/backup/addons/includes/samba
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)
diff --git a/make.sh b/make.sh
index 406326ff2248fa9fa29457f21fa72bb6362cb611..c42cc821b1b8d0fc73960b8c58ff7315b7f18532 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -394,7 +394,6 @@ buildipfire() {
   ipfiremake iptables
   ipfiremake libupnp
   ipfiremake ipp2p                     IPT=1
-  ipfiremake moblock
   ipfiremake linux-igd
   ipfiremake ipac-ng
   ipfiremake ipaddr
@@ -473,7 +472,7 @@ buildipfire() {
   ipfiremake htop
   ipfiremake postfix
   ipfiremake fetchmail
-  ipfiremake cyrusimap
+  ipfiremake cyrus-imapd
   ipfiremake openmailadmin
   ipfiremake mailx
   ipfiremake clamav
index 6fa682ee88e81ea704a1492c41b0bc5fa325fe30..1c4e760ea69aa0a2ca7809d7e8fed8d91d18ce60 100644 (file)
@@ -36,6 +36,20 @@ remove_files() {
        echo "...Finished."
 }
 
+make_backup(){
+               [ -e "/var/ipfire/backup/addons/include/${1}" ] && \
+               ( echo "Creating Backup..."
+                       /usr/local/bin/backupctrl addonbackup ${1}
+                       echo "...Finished." )
+}
+
+restore_backup(){
+               [ -e "/var/ipfire/backup/addons/backup/${1}" ] && \
+               ( echo "Restoring Backup..." && \
+                       /usr/local/bin/backupctrl restoreaddon ${1} && \
+                       echo "...Finished." )
+}
+
 restart_service() {
        
        /etc/init.d/$1 restart
index 14973a9986ddf98ecba83de66db8b960c9bfd953..d7f44054519b3b33104fc5957d77f347bb04d611 100644 (file)
@@ -2,5 +2,6 @@
 . /opt/pakfire/lib/functions.sh
 
 extract_files
+restore_backup ${NAME}
 
 start_service --delay 60 --background ${NAME}
index c12adf92c494ec7b03d5c0e553f7a2a3302c96c9..2ce20190c852a6e0f1fdce5a4fcabc69a8ca64b1 100644 (file)
@@ -2,3 +2,4 @@
 . /opt/pakfire/lib/functions.sh
 
 stop_service ${NAME}
+make_backup ${NAME}
index a47a7831dc62dba77d122eb1f06347e98cb65ff9..ba3239df67a47fe913dc72f160143e57979d43c3 100644 (file)
@@ -1,4 +1,6 @@
 #!/bin/bash
 . /opt/pakfire/lib/functions.sh
 
+make_backup ${NAME}
 extract_files
+restore_backup ${NAME}
index f5aefa427088ddaa20e23ab87dc0d8eb14fe3951..1b8e1df8bbe3723e0576b463fc4261836670277c 100644 (file)
@@ -9,3 +9,4 @@ ln -svf  /etc/init.d/mpd /etc/rc.d/rc6.d/K35mpd
 ln -svf  /var/ipfire/mpfire/mpd.conf /etc/mpd.conf
 touch /var/log/mpd.error.log
 touch /var/log/mpd.log
+restore_backup mpfire
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..28dcea518b3755cf145973021d2d9ba11a7d919f 100644 (file)
@@ -0,0 +1,4 @@
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+make_backup mpfire
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..82a5403f58ff626d56e5898583aa425c51013e75 100644 (file)
@@ -0,0 +1,5 @@
+#!/bin/bash
+. /opt/pakfire/lib/functions.sh
+
+make_backup mpfire
+restore_backup mpfire
index c8b63e7ca41c39ffe49102f0364e81c03b2a8ff0..62f33115d596a8bf0d48f6e3d0ce023163b52ea7 100644 (file)
@@ -560,6 +560,7 @@ END
                ;;
        esac
 
+sleep 15
        python tools/sendEmail < /tmp/ipfire_mail_body.$$
        if [ "$?" -eq "0" ]; then
                beautify message DONE