/[smecontribs]/rpms/smeserver-smeadmin/contribs10/smeserver-smeadmin-1.6-bz11062-initial-import.patch
ViewVC logotype

Contents of /rpms/smeserver-smeadmin/contribs10/smeserver-smeadmin-1.6-bz11062-initial-import.patch

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


Revision 1.1 - (show annotations) (download)
Thu Mar 25 05:47:03 2021 UTC (3 years, 7 months ago) by jpp
Branch: MAIN
* Thu Mar 25 2021 Jean-Philippe Pialasse <tests@pialasse.com> 1.6-2.sme
- fix mysql not migrating sme9admind  [SME: ]
- fix config db sme9admind not migrated to smeadmind
- fix /var/lib/sme9admin not migrated
- add smeserver-smeadmin-update event
- TODO fix services diplayed multiple times
- TODO make systemd unit
- TODO review new logs locations
- TODO check calls to sysvinit

1 diff -Nur --no-dereference smeserver-smeadmin-1.6.old/createlinks smeserver-smeadmin-1.6/createlinks
2 --- smeserver-smeadmin-1.6.old/createlinks 2020-10-15 07:31:28.000000000 -0400
3 +++ smeserver-smeadmin-1.6/createlinks 2021-03-25 01:33:42.522000000 -0400
4 @@ -22,10 +22,11 @@
5 #Creation of the event smeadmin-update
6 for my $event (qw(
7 smeadmin-update
8 + smeserver-smeadmin-update
9 ))
10
11 {
12 - safe_symlink("start", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
13 + safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/mysql.init");
14 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/smeadmind");
15 safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/lm_sensors");
16 }
17 diff -Nur --no-dereference smeserver-smeadmin-1.6.old/root/etc/e-smith/db/configuration/migrate/smeadmin smeserver-smeadmin-1.6/root/etc/e-smith/db/configuration/migrate/smeadmin
18 --- smeserver-smeadmin-1.6.old/root/etc/e-smith/db/configuration/migrate/smeadmin 2020-10-15 07:31:28.000000000 -0400
19 +++ smeserver-smeadmin-1.6/root/etc/e-smith/db/configuration/migrate/smeadmin 2021-03-25 01:29:34.607000000 -0400
20 @@ -20,6 +20,15 @@
21 warn "Could not open /dev/urandom: $!";
22 }
23
24 + # let's migrate sme9admind values to smeadmind
25 + if ( defined $sme9admind && ! defined $smeadmind ) {
26 + for my $propertie (keys %sme9admind) {
27 + next if $propertie eq "DbName" || $propertie eq "DbUser";
28 + $smeadmindb->set_prop($propertie, $sme9admind{$propertie});
29 + }
30 +
31 + }
32 +
33 $smeadmindb->set_prop('DbPassword', $pw) if not $smeadmindb->prop('DbPassword');
34
35 if ( -e "/etc/e-smith/web/panels/manager/html/smeadmin/_smeadmin.conf" ){
36 diff -Nur --no-dereference smeserver-smeadmin-1.6.old/root/etc/e-smith/sql/init/smeadmin smeserver-smeadmin-1.6/root/etc/e-smith/sql/init/smeadmin
37 --- smeserver-smeadmin-1.6.old/root/etc/e-smith/sql/init/smeadmin 2020-10-15 07:31:28.000000000 -0400
38 +++ smeserver-smeadmin-1.6/root/etc/e-smith/sql/init/smeadmin 2021-03-25 01:31:40.870000000 -0400
39 @@ -1,7 +1,7 @@
40 #!/bin/bash
41
42 # mysql
43 -if [ -d /var/lib/mysql/sme8admin ] && [ ! -d /var/lib/mysql/smeadmin ]; then
44 +if [ -d /var/lib/mysql/sme9admin ] && [ ! -d /var/lib/mysql/smeadmin ]; then
45 echo "Migrating existing sme8admin MySQL database."
46 mysqladmin create smeadmin
47 mysqldump sme8admin | mysql smeadmin
48 @@ -17,10 +17,10 @@
49 fi
50
51 # rrd
52 - # migrating previous sme8admin rrd
53 - if [ -d /var/lib/sme8admin ] && [ ! -d /var/lib/smeadmin ]; then
54 - echo "Migrating existing sme8admin RRDs files."
55 - cp -vr /var/lib/sme8admin /var/lib/smeadmin
56 + # migrating previous sme9admin rrd
57 + if [ -d /var/lib/sme9admin ] && [ ! -d /var/lib/smeadmin ]; then
58 + echo "Migrating existing sme9admin RRDs files."
59 + cp -vr /var/lib/sme9admin /var/lib/smeadmin
60 fi
61
62 #ADD more DS for version 1.5-10

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