iankelling.org
/
git
/
automated-distro-installer
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
c8de544
)
enable less service restarts to avoid nn bug
master
author
Ian Kelling
<iank@fsf.org>
Fri, 16 May 2025 04:08:34 +0000
(
00:08
-0400)
committer
Ian Kelling
<iank@fsf.org>
Fri, 16 May 2025 04:08:34 +0000
(
00:08
-0400)
fai/config/distro-install-common/bash-misc-funcs
patch
|
blob
|
history
diff --git
a/fai/config/distro-install-common/bash-misc-funcs
b/fai/config/distro-install-common/bash-misc-funcs
index af8a6affd17c5f4824b53334691e7a14d0c9b58b..60b35babed33356191c6204256170b208384a402 100644
(file)
--- a/
fai/config/distro-install-common/bash-misc-funcs
+++ b/
fai/config/distro-install-common/bash-misc-funcs
@@
-26,7
+26,7
@@
# updates $reload to true if file updated is in /etc/systemd/system
#
u() {
# updates $reload to true if file updated is in /etc/systemd/system
#
u() {
- local tmp tmpdir dest="$1"
+ local tmp tmpdir dest="$1"
ser
local base="${dest##*/}"
local dir="${dest%/*}"
if [[ $dir != "$base" ]]; then
local base="${dest##*/}"
local dir="${dest%/*}"
if [[ $dir != "$base" ]]; then
@@
-45,6
+45,15
@@
u() {
if [[ $dest == /etc/systemd/system/* ]]; then
# shellcheck disable=SC2034 # intentional
reload=true
if [[ $dest == /etc/systemd/system/* ]]; then
# shellcheck disable=SC2034 # intentional
reload=true
+ if declare -p modified_services &>/dev/null; then
+ ser=${dest#/etc/systemd/system/}
+ ser=${ser%%/*}
+ ser=%{ser%.d}
+ if [[ $ser == *.service || $ser == *.timer ]]; then
+ # shellcheck disable=SC2004 # seems false positive: this isnt arithmetic.
+ modified_services[$ser]=t
+ fi
+ fi
fi
fi
rm -rf $tmpdir
fi
fi
rm -rf $tmpdir