File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -308,10 +308,14 @@ main() {
308308 # from now, we need to be root
309309 (( UID != 0 )) && error ' You need to be root' && exit 1
310310
311- # call pacdiff to ensure config files are updated before restart
311+ # call pacdiff unless explicitly disabled to ensure config files are updated before restart
312312 if (( PACDIFF )) ; then
313- arrow ' Run pacdiff'
314- pacdiff
313+ if command -v pacdiff & > /dev/null ; then
314+ arrow ' Run pacdiff'
315+ pacdiff
316+ else
317+ warn ' skipping pacdiff as not installed'
318+ fi
315319 fi
316320
317321 # ensure systemd has been reloaded or reexectued
@@ -356,12 +360,6 @@ main() {
356360 fi
357361}
358362
359- # disable pacdiff by default if not installed
360- if ! command -v pacdiff & > /dev/null ; then
361- warn ' skipping pacdiff as not installed'
362- PACDIFF=0
363- fi
364-
365363main " $@ "
366364
367365exit 0
You can’t perform that action at this time.
0 commit comments