/[smeserver]/rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz12182-raidmonitor.patch
ViewVC logotype

Annotation of /rpms/e-smith-base/sme10/e-smith-base-5.8.1-bz12182-raidmonitor.patch

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


Revision 1.1 - (hide annotations) (download)
Mon Feb 6 04:42:20 2023 UTC (20 months, 3 weeks ago) by jpp
Branch: MAIN
CVS Tags: e-smith-base-5_8_1-25_el7_sme, e-smith-base-5_8_1-29_el7_sme, e-smith-base-5_8_1-31_el7_sme, e-smith-base-5_8_1-28_el7_sme, e-smith-base-5_8_1-27_el7_sme, e-smith-base-5_8_1-30_el7_sme, e-smith-base-5_8_1-26_el7_sme, HEAD
* Sun Feb 05 2023 Jean-Philippe Pialasse <tests@pialasse.com> 5.8.1-25.sme
- fix raidmonitor not starting [SME: 12182]

1 jpp 1.1 diff -Nur --no-dereference e-smith-base-5.8.1.old/createlinks e-smith-base-5.8.1/createlinks
2     --- e-smith-base-5.8.1.old/createlinks 2023-02-05 23:31:40.801000000 -0500
3     +++ e-smith-base-5.8.1/createlinks 2023-02-05 23:40:33.076000000 -0500
4     @@ -325,6 +325,7 @@
5     event_link("systemd-default", $event, "88");
6     event_link("systemd-isolate", $event, "89");
7     event_link("systemd-reload", $event, "89");
8     +event_link("raidmonitor-check", $event, "92");
9    
10     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/network");
11     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/wan");
12     @@ -347,6 +348,7 @@
13     event_link("conf-startup", $event, "60");
14     event_link("systemd-default", $event, "88");
15     event_link("systemd-reload", $event, "89");
16     +event_link("raidmonitor-check", $event, "92");
17     event_link("reset-unsavedflag", $event, "95");
18    
19     safe_symlink("restart", "root/etc/e-smith/events/$event/services2adjust/wan");
20     @@ -483,6 +485,7 @@
21     event_link("copy-anaconda-logs", $event, "90");
22     event_link("systemd-default", $event, "88");
23     event_link("systemd-reload", $event, "89");
24     +event_link("raidmonitor-check", $event, "92");
25    
26     #--------------------------------------------------
27     # actions for reboot event
28     diff -Nur --no-dereference e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/raidmonitor-check e-smith-base-5.8.1/root/etc/e-smith/events/actions/raidmonitor-check
29     --- e-smith-base-5.8.1.old/root/etc/e-smith/events/actions/raidmonitor-check 1969-12-31 19:00:00.000000000 -0500
30     +++ e-smith-base-5.8.1/root/etc/e-smith/events/actions/raidmonitor-check 2023-02-05 23:36:21.558000000 -0500
31     @@ -0,0 +1,36 @@
32     +#!/bin/bash
33     +#----------------------------------------------------------------------
34     +# copyright (C) 2013-2023 Koozali Foundation
35     +#
36     +# This program is free software; you can redistribute it and/or modify
37     +# it under the terms of the GNU General Public License as published by
38     +# the Free Software Foundation; either version 2 of the License, or
39     +# (at your option) any later version.
40     +#
41     +# This program is distributed in the hope that it will be useful,
42     +# but WITHOUT ANY WARRANTY; without even the implied warranty of
43     +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
44     +# GNU General Public License for more details.
45     +#
46     +# You should have received a copy of the GNU General Public License
47     +# along with this program; if not, write to the Free Software
48     +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
49     +#
50     +#----------------------------------------------------------------------
51     +
52     +#exit if nothing to handle raid is installed
53     +if [ ! -e /usr/sbin/mdadm ] ; then
54     + exit 0;
55     +fi
56     +# exit if raid is already configured
57     +if [ -e /etc/mdadm.conf ] ; then
58     + exit 0
59     +fi
60     +if [[ $(mdadm --detail --scan|wc -l) -ge 1 ]] ; then
61     + echo "writting available raid array to /etc/mdadm.conf"
62     + /usr/sbin/mdadm --detail --scan > /etc/mdadm.conf
63     + # restart if enabled
64     + if [[ $(/sbin/e-smith/config getprop raidmonitor status || echo "disabled") == "enabled" ]] ; then
65     + /usr/bin/systemctl restart raidmonitor.service
66     + fi
67     +fi

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