Skip to content

Commit

Permalink
ISSUE-20 Fix Systemd service names with dots
Browse files Browse the repository at this point in the history
  • Loading branch information
rovellipaolo committed Oct 20, 2023
1 parent 63cab98 commit 7aa517b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ build-settings:
.PHONY: install
install:
gnome-extensions install [email protected] --force
echo "Remember to restart GNOME Shell: press 'Alt'+'F2', type 'r' and press enter."
@echo "Remember to restart GNOME Shell: press 'Alt'+'F2', type 'r' and press enter."

.PHONY: install-checkstyle
install-checkstyle:
Expand Down
2 changes: 1 addition & 1 deletion metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@
"43",
"44"
],
"version": 24
"version": 25
}
2 changes: 1 addition & 1 deletion src/data/systemdRepository.js
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ var _parseService = (stdout, all = false) => {
service.id = stdout[LIST_INDEX_ID];
service.name = service.id.substring(
0,
service.id.indexOf(LIST_ID_NAME_SEPARATOR)
service.id.lastIndexOf(LIST_ID_NAME_SEPARATOR)
);
if (all) {
service.isEnabled =
Expand Down
8 changes: 4 additions & 4 deletions test/data/systemdRepositoryTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ function testSuite() {
"cron.service enabled-runtime enabled \n" +
"dbus.service static enabled \n" +
"docker.service enabled enabled \n" +
"lxc.service generated enabled \n" +
"lxc.lxc5.service generated enabled \n" +
"rsync.service enabled enabled \n" +
"8 unit files listed.";
const NO_ALL_SERVICES_STDOUT =
Expand All @@ -36,7 +36,7 @@ function testSuite() {
"● apport.service masked inactive dead LSB: automatic crash report generation\n" +
"cron.service loaded inactive dead Regular background program processing daemon\n" +
"docker.service loaded active running Docker Application Container Engine\n" +
"lxc.service loaded active exited lxc.service\n" +
"lxc.lxc5.service loaded active exited lxc.service\n" +
"rsync.service loaded active running fast remote file copy program daemon\n" +
"\n" +
"LOAD = Reflects whether the unit definition was properly loaded.\n" +
Expand Down Expand Up @@ -104,8 +104,8 @@ function testSuite() {
isRunning: true,
};
const SERVICE_LXC = {
id: "lxc.service",
name: "lxc",
id: "lxc.lxc5.service",
name: "lxc.lxc5",
isEnabled: true,
canBeEnabled: false,
isActive: true,
Expand Down

0 comments on commit 7aa517b

Please sign in to comment.