/[smecontribs]/rpms/smeserver-usbdisksmanager/contribs10/smeserver-usbdisksmanager-1.2-bz10294-tidy-options.patch
ViewVC logotype

Annotation of /rpms/smeserver-usbdisksmanager/contribs10/smeserver-usbdisksmanager-1.2-bz10294-tidy-options.patch

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


Revision 1.1 - (hide annotations) (download)
Thu Oct 29 19:30:00 2020 UTC (4 years, 1 month ago) by brianr
Branch: MAIN
CVS Tags: smeserver-usbdisksmanager-1_2-8_el7_sme, smeserver-usbdisksmanager-1_2-10_el7_sme, smeserver-usbdisksmanager-1_2-9_el7_sme, HEAD
Initial import

1 brianr 1.1 diff -Nur smeserver-usbdisksmanager-1.2.old/root/etc/e-smith/db/confusbdisks/migrate/00openRW smeserver-usbdisksmanager-1.2/root/etc/e-smith/db/confusbdisks/migrate/00openRW
2     --- smeserver-usbdisksmanager-1.2.old/root/etc/e-smith/db/confusbdisks/migrate/00openRW 1969-12-31 19:00:00.000000000 -0500
3     +++ smeserver-usbdisksmanager-1.2/root/etc/e-smith/db/confusbdisks/migrate/00openRW 2019-01-13 23:14:26.433000000 -0500
4     @@ -0,0 +1,4 @@
5     +{
6     + $DB = esmith::ConfigDB->open(${DB_FILENAME});
7     +}
8     +
9     diff -Nur smeserver-usbdisksmanager-1.2.old/root/etc/e-smith/db/confusbdisks/migrate/10options smeserver-usbdisksmanager-1.2/root/etc/e-smith/db/confusbdisks/migrate/10options
10     --- smeserver-usbdisksmanager-1.2.old/root/etc/e-smith/db/confusbdisks/migrate/10options 1969-12-31 19:00:00.000000000 -0500
11     +++ smeserver-usbdisksmanager-1.2/root/etc/e-smith/db/confusbdisks/migrate/10options 2019-01-13 23:14:51.014000000 -0500
12     @@ -0,0 +1,27 @@
13     +{
14     + my @add = split(/[,; ]+/, '');
15     + my %remove = map { $_ => 1 } split(/[,; ]+/, 'managed,pamconsole');
16     +# options=pamconsole,exec,noauto,managed,gid=102,uid=101
17     +# options=pamconsole,exec,noauto,managed
18     + for my $repo ( $DB->get_all )
19     + {
20     + #warn $repo->key;
21     + my @options = split(/,/, $repo->prop('options') || '');
22     + push @options, @add;
23     + @options = grep(!defined $remove{$_} , @options);
24     +
25     + # remove duplicates
26     + undef %saw;
27     + @options = grep(!$saw{$_}++, @options);
28     +
29     + if ($#options >= 0)
30     + {
31     + $repo->set_prop('options', join(',', @options));
32     + }
33     + else
34     + {
35     + # $repo->delete('options');
36     + }
37     + }
38     +}
39     +

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