Skip to content
This repository was archived by the owner on Aug 15, 2025. It is now read-only.

Commit 27b1422

Browse files
author
excalibur1234
committed
add check for failed systemd services to 'maintain system' option
1 parent 13a59ab commit 27b1422

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pacui

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,15 @@ function func_m
287287

288288

289289
echo " checking systemctl ..."
290-
290+
if (( $( systemctl --failed | awk -F 'loaded' 'NR==1 {print $1}' ) > 0 ))
291+
then
292+
echo -e " \e[41m The following systemd service(s) have failed. Please fix them manually. \e[0m"
293+
echo -e " \e[41m Display detailed information about a systemd service with: systemctl status <SYSTEMD SERVICE NAME> \e[0m"
294+
systemctl --failed
295+
fi
291296
echo ""
292297

293298

294-
295299
echo " checking symlinks ..."
296300
if [[ -n "$(sudo find -xtype l)" ]] # only run, if output of "sudo find -xtype l -print" is not empty
297301
then
@@ -1809,6 +1813,9 @@ In most cases, the syntax does not change and you can simply remove the .pacnew
18091813
\e[1mAttention\e[0m: This command requires a default file difference viewer by setting the environment variable DIFFPROG. If this varialbe is not set, a minimal default is provided by PacUI using "diff".
18101814
\e[1mAttention\e[0m: In severe and rare cases, removing your old config file (and using the new .pacnew config file) OR keeping your old config file (and deleting the .pacnew config file) can result in a broken system. PLEASE BE CAUTIOUS WHEN USING THIS COMMAND!
18111815
1816+
\e[36m"systemctl --failed"
1817+
This command checks for systemd services in a failed state. It is possible the systemd service will no longer be failed after a reboot. But if a systemd service still fails after a reboot, you should manually fix the problem. Start by using the command "systemctl status <SYSTEMD SERVICE NAME>".
1818+
18121819
\e[36m"sudo find -xtype l" \e[0m(only if there are broken symlinks)
18131820
This command displays a list of broken symbolic links on your system. These links are not deleted by default. You have to decide yourself what to do with them. When you have doubt about deleting them, leave them on your system. They can sometimes cause problems, but they use almost no hard drive space.
18141821
Symbolic links can be removed manually or "sudo find -xtype l -delete" can be used to remove all broken symbolic links.

0 commit comments

Comments
 (0)