forked from pool/systemd
bbba62be60
- Add or port upstream bugfix patches: 0001-Fix-systemd-stdio-bridge-symlink.patch 0002-execute-free-directory-path-if-we-fail-to-remove-it-.patch 0003-Do-not-print-invalid-UTF-8-in-error-messages.patch 0004-man-document-missing-options-of-systemd-run.patch 0005-systemd-run-add-some-extra-safety-checks.patch 0006-journal-assume-that-next-entry-is-after-previous-ent.patch 0007-journal-forget-file-after-encountering-an-error.patch 0008-core-correctly-unregister-PIDs-from-PID-hashtables.patch 0009-logind-fix-reference-to-systemd-user-sessions.servic.patch 0010-man-update-link-to-LSB.patch 0011-man-systemd-bootchart-fix-spacing-in-command.patch 0012-man-add-missing-comma.patch 0013-units-Do-not-unescape-instance-name-in-systemd-backl.patch - Add linker scripts as place holder of the old systemd shared libraries now all included in libsystemd.so (bnc#867128) - Make patch 1006-udev-always-rename-network.patch work again and add it again. - address missing owner functionality in systemd-tmpfiles (fate#314974) 1022-systemd-tmpfiles-ownerkeep.patch - Generate the bash completion files on the fly for the case of not having the package bash-completion around - Add or port upstream bugfix patches: 0001-nspawn-fix-detection-of-missing-proc-self-loginuid.patch 0002-cdrom_id-use-the-old-MMC-fallback.patch 0003-journalctl-refuse-extra-arguments-with-verify-and-si.patch OBS-URL: https://build.opensuse.org/request/show/225408 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/systemd?expand=0&rev=177
237 lines
7.7 KiB
Diff
237 lines
7.7 KiB
Diff
--- systemd-208/shell-completion/bash/hostnamectl
|
|
+++ systemd-208/shell-completion/bash/hostnamectl 2014-01-17 14:27:16.183272019 +0000
|
|
@@ -30,6 +30,10 @@ _hostnamectl() {
|
|
local OPTS='-h --help --version --transient --static --pretty
|
|
--no-ask-password -H --host'
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if [[ $cur = -* ]]; then
|
|
COMPREPLY=( $(compgen -W '${OPTS[*]}' -- "$cur") )
|
|
return 0
|
|
@@ -58,4 +62,4 @@ _hostnamectl() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _hostnamectl hostnamectl
|
|
+complete -o default -o bashdefault -F _hostnamectl hostnamectl
|
|
--- systemd-208/shell-completion/bash/journalctl
|
|
+++ systemd-208/shell-completion/bash/journalctl 2014-01-17 14:34:30.338737694 +0000
|
|
@@ -49,6 +49,10 @@ _journalctl() {
|
|
--verify-key'
|
|
)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "$prev" ${OPTS[ARG]} ${OPTS[ARGUNKNOWN]}; then
|
|
case $prev in
|
|
--boot|--this-boot|-b)
|
|
@@ -107,4 +111,4 @@ _journalctl() {
|
|
fi
|
|
}
|
|
|
|
-complete -F _journalctl journalctl
|
|
+complete -o default -o bashdefault -F _journalctl journalctl
|
|
--- systemd-208/shell-completion/bash/kernel-install
|
|
+++ systemd-208/shell-completion/bash/kernel-install 2014-01-17 14:34:41.982255874 +0000
|
|
@@ -18,11 +18,22 @@
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
+__contains_word () {
|
|
+ local w word=$1; shift
|
|
+ for w in "$@"; do
|
|
+ [[ $w = "$word" ]] && return
|
|
+ done
|
|
+}
|
|
+
|
|
_kernel_install() {
|
|
local comps
|
|
local MACHINE_ID
|
|
local cur=${COMP_WORDS[COMP_CWORD]}
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
case $COMP_CWORD in
|
|
1)
|
|
comps="add remove"
|
|
@@ -47,4 +58,4 @@ _kernel_install() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _kernel_install kernel-install
|
|
+complete -o default -o bashdefault -F _kernel_install kernel-install
|
|
--- systemd-208/shell-completion/bash/localectl
|
|
+++ systemd-208/shell-completion/bash/localectl 2014-01-17 14:34:52.546235747 +0000
|
|
@@ -30,6 +30,10 @@ _localectl() {
|
|
local OPTS='-h --help --version --no-convert --no-pager --no-ask-password
|
|
-H --host'
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "$prev" $OPTS; then
|
|
case $prev in
|
|
--host|-H)
|
|
@@ -73,4 +77,4 @@ _localectl() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _localectl localectl
|
|
+complete -o default -o bashdefault -F _localectl localectl
|
|
--- systemd-208/shell-completion/bash/loginctl
|
|
+++ systemd-208/shell-completion/bash/loginctl 2014-01-17 14:35:03.386245699 +0000
|
|
@@ -37,6 +37,10 @@ _loginctl () {
|
|
[ARG]='--host -H --kill-who --property -p --signal -s'
|
|
)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "$prev" ${OPTS[ARG]}; then
|
|
case $prev in
|
|
--signal|-s)
|
|
@@ -106,4 +110,4 @@ _loginctl () {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _loginctl loginctl
|
|
+complete -o default -o bashdefault -F _loginctl loginctl
|
|
--- systemd-208/shell-completion/bash/systemctl
|
|
+++ systemd-208/shell-completion/bash/systemctl 2014-01-17 14:35:26.506235666 +0000
|
|
@@ -77,6 +77,10 @@ _systemctl () {
|
|
[ARG]='--host -H --kill-mode --kill-who --property -p --signal -s --type -t --state --root'
|
|
)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "--user" ${COMP_WORDS[*]}; then
|
|
mode=--user
|
|
else
|
|
@@ -226,4 +230,4 @@ _systemctl () {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _systemctl systemctl
|
|
+complete -o default -o bashdefault -F _systemctl systemctl
|
|
--- systemd-208/shell-completion/bash/systemd-analyze
|
|
+++ systemd-208/shell-completion/bash/systemd-analyze 2014-01-17 14:35:38.366736021 +0000
|
|
@@ -37,6 +37,10 @@ _systemd_analyze() {
|
|
[LOG_LEVEL]='set-log-level'
|
|
)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
_init_completion || return
|
|
|
|
for ((i=0; i < COMP_CWORD; i++)); do
|
|
@@ -83,4 +87,4 @@ _systemd_analyze() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _systemd_analyze systemd-analyze
|
|
+complete -o default -o bashdefault -F _systemd_analyze systemd-analyze
|
|
--- systemd-208/shell-completion/bash/systemd-coredumpctl
|
|
+++ systemd-208/shell-completion/bash/systemd-coredumpctl 2014-01-17 14:35:46.434235632 +0000
|
|
@@ -44,6 +44,10 @@ _coredumpctl() {
|
|
[DUMP]='dump gdb'
|
|
)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "$prev" '--output -o'; then
|
|
comps=$( compgen -A file -- "$cur" )
|
|
compopt -o filenames
|
|
@@ -82,4 +86,4 @@ _coredumpctl() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _coredumpctl systemd-coredumpctl
|
|
+complete -o default -o bashdefault -F _coredumpctl systemd-coredumpctl
|
|
--- systemd-208/shell-completion/bash/systemd-run
|
|
+++ systemd-208/shell-completion/bash/systemd-run 2014-01-17 14:35:55.938236298 +0000
|
|
@@ -17,6 +17,13 @@
|
|
# You should have received a copy of the GNU Lesser General Public License
|
|
# along with systemd; If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
+__contains_word () {
|
|
+ local w word=$1; shift
|
|
+ for w in "$@"; do
|
|
+ [[ $w = "$word" ]] && return
|
|
+ done
|
|
+}
|
|
+
|
|
__systemctl() {
|
|
local mode=$1; shift 1
|
|
systemctl $mode --full --no-legend "$@"
|
|
@@ -31,6 +38,11 @@ _systemd_run() {
|
|
|
|
local mode=--system
|
|
local i
|
|
+
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
for (( i=1; i <= COMP_CWORD; i++ )); do
|
|
if [[ ${COMP_WORDS[i]} != -* ]]; then
|
|
local root_command=${COMP_WORDS[i]}
|
|
@@ -60,4 +72,4 @@ _systemd_run() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _systemd_run systemd-run
|
|
+complete -o default -o bashdefault -F _systemd_run systemd-run
|
|
--- systemd-208/shell-completion/bash/timedatectl
|
|
+++ systemd-208/shell-completion/bash/timedatectl 2014-01-17 14:36:06.182735466 +0000
|
|
@@ -30,6 +30,10 @@ _timedatectl() {
|
|
local OPTS='-h --help --version --adjust-system-clock --no-pager
|
|
--no-ask-password -H --host'
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
if __contains_word "$prev" $OPTS; then
|
|
case $prev in
|
|
--host|-H)
|
|
@@ -73,4 +77,4 @@ _timedatectl() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _timedatectl timedatectl
|
|
+complete -o default -o bashdefault -F _timedatectl timedatectl
|
|
--- systemd-208/shell-completion/bash/udevadm
|
|
+++ systemd-208/shell-completion/bash/udevadm 2014-01-17 14:36:16.406236120 +0000
|
|
@@ -36,6 +36,10 @@ _udevadm() {
|
|
|
|
local verbs=(info trigger settle control monitor hwdb test-builtin test)
|
|
|
|
+ if __contains_word ">" ${COMP_WORDS[*]:0:COMP_CWORD}; then
|
|
+ return 0
|
|
+ fi
|
|
+
|
|
for ((i=0; i < COMP_CWORD; i++)); do
|
|
if __contains_word "${COMP_WORDS[i]}" "${verbs[@]}" &&
|
|
! __contains_word "${COMP_WORDS[i-1]}" ${OPTS[ARG]}; then
|
|
@@ -94,4 +98,4 @@ _udevadm() {
|
|
return 0
|
|
}
|
|
|
|
-complete -F _udevadm udevadm
|
|
+complete -o default -o bashdefault -F _udevadm udevadm
|