From 36b4a7ba555540edb7648e0f97019280b4ac38de Mon Sep 17 00:00:00 2001 From: Zbigniew Jędrzejewski-Szmek Date: Sun, 8 Nov 2015 14:12:54 +0100 Subject: Remove snapshot unit type Snapshots were never useful or used for anything. Many systemd developers that I spoke to at systemd.conf2015, didn't even know they existed, so it is fairly safe to assume that this type can be deleted without harm. The fundamental problem with snapshots is that the state of the system is dynamic, devices come and go, users log in and out, timers fire... and restoring all units to some state from the past would "undo" those changes, which isn't really possible. Tested by creating a snapshot, running the new binary, and checking that the transition did not cause errors, and the snapshot is gone, and snapshots cannot be created anymore. New systemctl says: Unknown operation snapshot. Old systemctl says: Failed to create snapshot: Support for snapshots has been removed. IgnoreOnSnaphost settings are warned about and ignored: Support for option IgnoreOnSnapshot= has been removed and it is ignored http://lists.freedesktop.org/archives/systemd-devel/2015-November/034872.html --- shell-completion/bash/systemctl.in | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'shell-completion/bash') diff --git a/shell-completion/bash/systemctl.in b/shell-completion/bash/systemctl.in index f9a4f2265e..d80d8f02a8 100644 --- a/shell-completion/bash/systemctl.in +++ b/shell-completion/bash/systemctl.in @@ -174,14 +174,12 @@ _systemctl () { [TARGET_AND_UNITS]='add-wants add-requires' [MASKED_UNITS]='unmask' [JOBS]='cancel' - [SNAPSHOTS]='delete' [ENVS]='set-environment unset-environment' [STANDALONE]='daemon-reexec daemon-reload default emergency exit halt hibernate hybrid-sleep kexec list-jobs list-sockets list-timers list-units list-unit-files poweroff reboot rescue show-environment suspend get-default is-system-running' - [NAME]='snapshot' [FILE]='link switch-root' [TARGETS]='set-default' ) @@ -259,16 +257,12 @@ _systemctl () { fi compopt -o filenames - elif __contains_word "$verb" ${VERBS[STANDALONE]} ${VERBS[NAME]}; then + elif __contains_word "$verb" ${VERBS[STANDALONE]}; then comps='' elif __contains_word "$verb" ${VERBS[JOBS]}; then comps=$( __systemctl $mode list-jobs | { while read -r a b; do echo " $a"; done; } ) - elif __contains_word "$verb" ${VERBS[SNAPSHOTS]}; then - comps=$( __systemctl $mode list-units --type snapshot --full --all \ - | { while read -r a b; do echo " $a"; done; } ) - elif __contains_word "$verb" ${VERBS[ENVS]}; then comps=$( __systemctl $mode show-environment \ | while read -r line; do echo " ${line%%=*}=";done ) -- cgit v1.2.3-54-g00ecf