Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ PREFIX?=/usr/bin
HOOK_DIR=

MAJOR=0
MINOR=2
MINOR=3

VERSION=v$(MAJOR).$(MINOR)

Expand All @@ -24,7 +24,7 @@ CONF_DIR=/etc/smart-restart-conf.d
HOOK_ACTION=install.action
HOOK_ACTION_TEMPLATE=$(HOOK_ACTION).in
DENYLIST_CONF_FILE=default-denylist
MAN_FILE=smart-restart.man1
MAN_FILE=smart-restart.1
MAN_FILE_LOCATION=/usr/share/man/man1


Expand All @@ -37,7 +37,7 @@ all:
srpm: sources

sources:
tar czf ./smart-restart-v$(VERSION).tar.gz --transform 's,^,smart-restart-v$(VERSION)/,' bin conf Makefile smart-restart.spec doc/smart-restart.man1
tar czf ./smart-restart-v$(VERSION).tar.gz --transform 's,^,smart-restart-v$(VERSION)/,' bin conf Makefile smart-restart.spec doc/smart-restart.1

install:
$(info Dest: $(DEST_DIR))
Expand Down
10 changes: 6 additions & 4 deletions bin/smart-restart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ readonly REBOOT_HINT_PATH=${REBOOT_HINT_PATH:-/run/smart-restart}
readonly REBOOT_HINT_MARKER="${REBOOT_HINT_PATH}"/reboot-hint-marker
readonly CONF_PATH=${CONF_PATH:-/etc/smart-restart-conf.d}
readonly DENYLISTS=("${CONF_PATH}"/*-denylist)
# shellcheck disable=SC2207
readonly PRE_RESTART=($(ls "$CONF_PATH"/*pre-restart | sort -n))
# shellcheck disable=SC2207
readonly POST_RESTART=($(ls "$CONF_PATH"/*post-restart | sort -n))
# Pin name-sorted glob results (bash >= 5.3 honors GLOBSORT from the environment)
GLOBSORT=name
shopt -s nullglob
readonly PRE_RESTART=("$CONF_PATH"/*pre-restart)
readonly POST_RESTART=("$CONF_PATH"/*post-restart)
shopt -u nullglob

SYSCTL_COMMAND="${SYSCTL_COMMAND:-systemctl}"
NEEDS_RESTARTING_COMMAND="${NEEDS_RESTARTING_COMMAND:-/usr/bin/needs-restarting}"
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion smart-restart.spec
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ make DEST_DIR=$RPM_BUILD_ROOT pkg_manager=%{pkg_manager} PREFIX=%{_bindir} insta
%{_bindir}/%{name}.sh
%config %{_sysconfdir}/%{_plugin_path}/install.action
%config %{_sysconfdir}/smart-restart-conf.d/default-denylist
%doc %{_mandir}/man1/smart-restart.man1.gz
%doc %{_mandir}/man1/smart-restart.1*

%changelog
* Wed Mar 06 2024 Stanislav Uschakow <suschako@amazon.de> - 0.1-1.amzn2023.0.1
Expand Down
Loading