/[smeserver]/rpms/e-smith-base/sme9/e-smith-base-5.4.0-consoleBackupRestore2.patch
ViewVC logotype

Contents of /rpms/e-smith-base/sme9/e-smith-base-5.4.0-consoleBackupRestore2.patch

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.2 - (show annotations) (download)
Mon Mar 24 03:05:35 2014 UTC (10 years, 7 months ago) by wellsi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.1: +0 -0 lines
Error occurred while calculating annotation data.
FILE REMOVED
* Sun Mar 23 2014 Ian Wells <esmith@wellsi.com> 5.6.0-1.sme
- Roll new stream to remove obsolete images [SME: 7962]

1 diff -ruN e-smith-base-5.4.0/root/etc/e-smith/db/configuration/defaults/bootstrap-console/Restore e-smith-base-5.4.0.v58t/root/etc/e-smith/db/configuration/defaults/bootstrap-console/Restore
2 --- e-smith-base-5.4.0/root/etc/e-smith/db/configuration/defaults/bootstrap-console/Restore 1969-12-31 16:00:00.000000000 -0800
3 +++ e-smith-base-5.4.0.v58t/root/etc/e-smith/db/configuration/defaults/bootstrap-console/Restore 2005-11-20 20:28:04.000000000 -0800
4 @@ -0,0 +1 @@
5 +enabled
6 diff -ruN e-smith-base-5.4.0/root/sbin/e-smith/bootstrap-console e-smith-base-5.4.0.v58t/root/sbin/e-smith/bootstrap-console
7 --- e-smith-base-5.4.0/root/sbin/e-smith/bootstrap-console 2014-03-15 17:35:50.000000000 -0700
8 +++ e-smith-base-5.4.0.v58t/root/sbin/e-smith/bootstrap-console 2014-03-15 23:13:53.000000000 -0700
9 @@ -36,11 +36,9 @@
10 use esmith::console::backup_running;
11 esmith::console::backup_running->new->doit($console, $db);
12
13 -unless ($db->get_value('PasswordSet') eq 'yes') # Too late to do a restore
14 -{
15 - use esmith::console::perform_restore;
16 - esmith::console::perform_restore->new->doit($console, $db);
17 -}
18 +use esmith::console::perform_restore;
19 +esmith::console::perform_restore->new->doit($console, $db);
20 +
21 use esmith::console::system_password;
22 esmith::console::system_password->new->doit($console, $db);
23
24 diff -ruN e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm e-smith-base-5.4.0.v58t/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm
25 --- e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm 2014-03-15 17:35:50.000000000 -0700
26 +++ e-smith-base-5.4.0.v58t/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm 2014-03-15 23:21:25.000000000 -0700
27 @@ -9,7 +9,7 @@
28 {
29 my $class = shift;
30 my $self = {
31 - name => gettext("Perform restore from removable media"),
32 + name => gettext("Restore from removable media"),
33 order => installOrder(),
34 };
35 bless $self, $class;
36 @@ -30,6 +30,11 @@
37 sub doit
38 {
39 my ($self, $console, $db) = @_;
40 + if ($db->get_prop('bootstrap-console', 'Run') eq 'yes') # called from bootstrap console
41 + {
42 + return if ($db->get_value('PasswordSet') eq 'yes'); # too late
43 + }
44 + return if ($db->get_prop('bootstrap-console', 'Restore') eq 'disabled');
45 my ($rc, $choice) = $console->yesno_page
46 (
47 title => gettext("Restore From Backup"),
48 @@ -137,12 +142,26 @@
49 gunzip |
50 tar xf - > /dev/null ) 2>&1 |
51 dialog --backtitle 'Restoring data' --guage 'Progress' 7 70");
52 - $db->set_prop("bootstrap-console", "ForceSave", "yes");
53 system("/bin/umount", "$device");
54 system("/etc/init.d/haldaemon", "stop");
55 system("/etc/init.d/messagebus", "stop");
56 rmdir("/mnt/bootstrap-console-backup");
57 system("/sbin/e-smith/signal-event", "post-upgrade");
58 +
59 + unless ( $self->{bootstrap} )
60 + {
61 + $db->set_prop("bootstrap-console", "Run", "yes");
62 + $db->set_prop("bootstrap-console", "ForceSave", "yes");
63 + $db->set_prop("bootstrap-console", "Restore", "disabled");
64 +
65 + system("/usr/bin/tput", "clear");
66 + system("/sbin/e-smith/signal-event", "reboot");
67 +
68 + # A bit of a hack to avoid the console restarting before the
69 + # reboot takes effect.
70 +
71 + sleep(600);
72 + }
73 return;
74 }
75
76 diff -ruN e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/save_config.pm e-smith-base-5.4.0.v58t/root/usr/share/perl5/vendor_perl/esmith/console/save_config.pm
77 --- e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/save_config.pm 2008-03-26 09:49:00.000000000 -0700
78 +++ e-smith-base-5.4.0.v58t/root/usr/share/perl5/vendor_perl/esmith/console/save_config.pm 2014-03-15 18:29:05.000000000 -0700
79 @@ -21,6 +21,7 @@
80 # After saving config we don't need to run it again on the next reboot.
81 $db->set_prop("bootstrap-console", "ForceSave", "no");
82 $db->set_prop("bootstrap-console", "Run", "no");
83 + $db->set_prop("bootstrap-console", "Restore", "enabled"); # Allow console restores
84
85 $console->infobox(
86 title => gettext("Activating configuration settings"),

admin@koozali.org
ViewVC Help
Powered by ViewVC 1.2.1 RSS 2.0 feed