summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorFrederic Crozat <fcrozat@suse.com>2011-08-01 18:43:01 +0200
committerLennart Poettering <lennart@poettering.net>2011-08-01 23:29:56 +0200
commit54a437057e83ca41f329f010e2a0e968ed3880b2 (patch)
treeb5e59a42f3fd7b77fa29d24d4205051383a1cbb0 /src
parent283ef082ee4d426223265de42f791ec43de9726a (diff)
bash: Allow to restart already started service.
Allow to restart all services, not only inactive one. https://bugzilla.novell.com/show_bug.cgi?id=704782
Diffstat (limited to 'src')
-rw-r--r--src/systemctl-bash-completion.sh7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/systemctl-bash-completion.sh b/src/systemctl-bash-completion.sh
index acdc0866cd..6369a6ca39 100644
--- a/src/systemctl-bash-completion.sh
+++ b/src/systemctl-bash-completion.sh
@@ -79,10 +79,11 @@ _systemctl () {
local -A VERBS=(
[ALL_UNITS]='enable disable is-active is-enabled status show'
[FAILED_UNITS]='reset-failed'
- [STARTABLE_UNITS]='start restart reload-or-restart'
+ [STARTABLE_UNITS]='start'
[STOPPABLE_UNITS]='stop kill try-restart condrestart'
[ISOLATABLE_UNITS]='isolate'
[RELOADABLE_UNITS]='reload reload-or-try-restart force-reload'
+ [RESTARTABLE_UNITS]='restart reload-or-restart'
[JOBS]='cancel'
[SNAPSHOTS]='delete'
[ENVS]='set-environment unset-environment'
@@ -110,6 +111,10 @@ _systemctl () {
comps=$( __filter_units_by_property CanStart yes \
$( __get_inactive_units | grep -Ev '\.(device|snapshot)$' ))
+ elif __contains_word "$verb" ${VERBS[RESTARTABLE_UNITS]}; then
+ comps=$( __filter_units_by_property CanStart yes \
+ $( __get_all_units | grep -Ev '\.(device|snapshot|socket|timer)$' ))
+
elif __contains_word "$verb" ${VERBS[STOPPABLE_UNITS]}; then
comps=$( __filter_units_by_property CanStop yes \
$( __get_active_units ) )