]> git.ipfire.org Git - people/mlorenz/ipfire-2.x.git/commitdiff
apcupsd: Make apcupsd link in services page access its apcupsd WUI menu.
authorAdolf Belka <adolf.belka@ipfire.org>
Mon, 4 Sep 2023 16:52:31 +0000 (18:52 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 5 Sep 2023 15:15:53 +0000 (15:15 +0000)
- In the services WUI page any addon that has a WUI menu page defined, such as Samba,
   Guardian etc, has the addon name shown in underlined red which is a link to the addon
   cgi page. This works for the other addons as the addon cgi name is the same as the
   addon name. I have identified that this is not the case for apcupsd, because the cgi
   page is called upsstats.cgi
- This patch adjusts the cgi name to allow apcupsd to also be shown in underlined red.
- The lfs file copies the upsstats.cgi file to one named apcupsd.cgi
- The apcupsd menu file has the cgi name changed from upsstats.cgi to apcupsd.cgi
- The rootfile is updated to also include the apcupsd.cgi file with the others.
- Tested in my vm testbed by making the above changes in the code and the apcupsd addon
   was then shown in underlined red, which acted as a link to the apcupsd status WUI page.

Tested-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Adolf Belka <adolf.belka@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/menu/EX-apcupsd.menu
config/rootfiles/packages/apcupsd
lfs/apcupsd

index 5f01dce33fc647a8c9af28dfc92e240ddcc7c9cf..ae462db1843f800958305eae6c21129417d19e83 100644 (file)
@@ -1,5 +1,5 @@
     $subipfire->{'35.apcupsd'} = {'caption' => $Lang::tr{'apcupsd'},
-                                 'uri' => '/cgi-bin/upsstats.cgi',
+                                 'uri' => '/cgi-bin/apcupsd.cgi',
                                  'title' => $Lang::tr{'apcupsd'},
                                  'enabled' => 1,
                                  };
index a28c961eb5d630861247d3a4faf22c99a3d364fc..f85ba3557d651401dd4ab2e4d3458abc7012d23b 100644 (file)
@@ -21,6 +21,7 @@ srv/web/ipfire/cgi-bin/multimon.cgi
 srv/web/ipfire/cgi-bin/upsfstats.cgi
 srv/web/ipfire/cgi-bin/upsimage.cgi
 srv/web/ipfire/cgi-bin/upsstats.cgi
+srv/web/ipfire/cgi-bin/apcupsd.cgi
 #usr/share/hal
 #usr/share/hal/fdi
 #usr/share/hal/fdi/policy
index f7c0b245f2aa3b96d8083323e2ce3bf55ef20931..8ed9bbd8cb6fc093db411109a803393291fd6c2f 100644 (file)
@@ -34,7 +34,7 @@ DL_FROM    = $(URL_IPFIRE)
 DIR_APP    = $(DIR_SRC)/$(THISAPP)
 TARGET     = $(DIR_INFO)/$(THISAPP)
 PROG       = apcupsd
-PAK_VER    = 10
+PAK_VER    = 11
 
 DEPS       =
 
@@ -95,5 +95,6 @@ $(TARGET) : $(patsubst %,$(DIR_DL)/%,$(objects))
        ln -sf ../init.d/apcupsd /etc/rc.d/rc6.d/K35apcupsd
        install -v -m 644 ${DIR_SRC}/config/backup/includes/apcupsd \
                        /var/ipfire/backup/addons/includes/apcupsd
+       cp /srv/web/ipfire/cgi-bin/upsstats.cgi /srv/web/ipfire/cgi-bin/apcupsd.cgi
        @rm -rf $(DIR_APP)
        @$(POSTBUILD)