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

Annotation of /rpms/e-smith-base/sme9/e-smith-base-5.4.0-consoleBackupRestore.patch

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


Revision 1.3 - (hide annotations) (download)
Mon Mar 24 03:05:35 2014 UTC (10 years, 8 months ago) by wellsi
Branch: MAIN
CVS Tags: HEAD
Changes since 1.2: +0 -0 lines
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 wellsi 1.1 diff -ruN e-smith-base-5.4.0.old/root/sbin/e-smith/console-menu-items/usbRestore.pl e-smith-base-5.4.0/root/sbin/e-smith/console-menu-items/usbRestore.pl
2     --- e-smith-base-5.4.0.old/root/sbin/e-smith/console-menu-items/usbRestore.pl 1969-12-31 16:00:00.000000000 -0800
3     +++ e-smith-base-5.4.0/root/sbin/e-smith/console-menu-items/usbRestore.pl 2014-03-06 20:27:00.000000000 -0800
4     @@ -0,0 +1,3 @@
5     +package esmith::console::perform_restore;
6     +use esmith::console::perform_restore;
7     +return new esmith::console::perform_restore;
8     diff -ruN e-smith-base-5.4.0.old/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm
9     --- e-smith-base-5.4.0.old/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm 2014-03-06 20:19:15.000000000 -0800
10     +++ e-smith-base-5.4.0/root/usr/share/perl5/vendor_perl/esmith/console/perform_restore.pm 2014-03-06 21:05:43.000000000 -0800
11     @@ -8,15 +8,28 @@
12     sub new
13     {
14     my $class = shift;
15     - my $self = {};
16     + my $self = {
17     + name => gettext("Perform restore from removable media"),
18     + order => installOrder(),
19     + };
20     bless $self, $class;
21     return $self;
22     }
23    
24     +
25     +sub name
26     +{
27     + return $_[0]->{name};
28     +}
29     +
30     +sub order
31     +{
32     + return $_[0]->{order};
33     +}
34     +
35     sub doit
36     {
37     my ($self, $console, $db) = @_;
38     - return if ($db->get_value('PasswordSet') eq 'yes'); # Too late to do a restore
39     my ($rc, $choice) = $console->yesno_page
40     (
41     title => gettext("Restore From Backup"),
42     @@ -132,6 +145,15 @@
43     system("/sbin/e-smith/signal-event", "post-upgrade");
44     }
45    
46     +# Determine if this server is a fresh install for restore from backup
47     +sub installOrder
48     +{
49     +#my $db = esmith::ConfigDB::unsaved->open;
50     +#return if ($db->get_value('PasswordSet') eq 'yes'); # Too late to do a restore
51     + my $order = (`grep :x:5...: /etc/group`) ? -1 : 90;
52     + return $order;
53     +}
54     +
55     #use esmith::console;
56     #esmith::console::perform_restore->new->doit(esmith::console->new,
57     # esmith::ConfigDB->open);
58 wellsi 1.2 diff -ruN e-smith-base-5.4.0.old/root/sbin/e-smith/bootstrap-console e-smith-base-5.4.0/root/sbin/e-smith/bootstrap-console
59     --- e-smith-base-5.4.0.old/root/sbin/e-smith/bootstrap-console 2008-03-26 09:49:00.000000000 -0700
60     +++ e-smith-base-5.4.0/root/sbin/e-smith/bootstrap-console 2014-03-08 09:27:49.000000000 -0800
61     @@ -36,9 +36,11 @@
62     use esmith::console::backup_running;
63     esmith::console::backup_running->new->doit($console, $db);
64    
65     -use esmith::console::perform_restore;
66     -esmith::console::perform_restore->new->doit($console, $db);
67     -
68     +unless ($db->get_value('PasswordSet') eq 'yes') # Too late to do a restore
69     +{
70     + use esmith::console::perform_restore;
71     + esmith::console::perform_restore->new->doit($console, $db);
72     +}
73     use esmith::console::system_password;
74     esmith::console::system_password->new->doit($console, $db);
75    

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