mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-09 18:45:54 +02:00
Korrekturen damit der Build wieder laeuft
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
This commit is contained in:
@@ -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]'");
|
||||
}
|
||||
|
||||
@@ -90,7 +90,7 @@ sub clearplaylist(){
|
||||
}
|
||||
|
||||
sub shuffle(){
|
||||
system("mpc shuffle >/dev/null");
|
||||
system("mpc random >/dev/null");
|
||||
}
|
||||
|
||||
sub checkplaylist(){
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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
|
||||
@@ -148,7 +147,7 @@
|
||||
* 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
|
||||
@@ -215,7 +214,7 @@
|
||||
* 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
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -353,8 +353,10 @@
|
||||
'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.',
|
||||
|
||||
@@ -370,8 +370,10 @@
|
||||
'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.',
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
3
make.sh
3
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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -2,5 +2,6 @@
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
extract_files
|
||||
restore_backup ${NAME}
|
||||
|
||||
start_service --delay 60 --background ${NAME}
|
||||
|
||||
@@ -2,3 +2,4 @@
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
stop_service ${NAME}
|
||||
make_backup ${NAME}
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
#!/bin/bash
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
make_backup ${NAME}
|
||||
extract_files
|
||||
restore_backup ${NAME}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
make_backup mpfire
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
#!/bin/bash
|
||||
. /opt/pakfire/lib/functions.sh
|
||||
|
||||
make_backup mpfire
|
||||
restore_backup mpfire
|
||||
|
||||
@@ -560,6 +560,7 @@ END
|
||||
;;
|
||||
esac
|
||||
|
||||
sleep 15
|
||||
python tools/sendEmail < /tmp/ipfire_mail_body.$$
|
||||
if [ "$?" -eq "0" ]; then
|
||||
beautify message DONE
|
||||
|
||||
Reference in New Issue
Block a user