mirror of
https://github.com/systemd/systemd.git
synced 2024-10-28 11:55:44 +03:00
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
This commit is contained in:
parent
283ef082ee
commit
54a437057e
@ -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 ) )
|
||||
|
Loading…
Reference in New Issue
Block a user