Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

op-mode: T4038: Remove legacy vyatta-image-tools.pl #84

Merged
merged 1 commit into from
Feb 8, 2024
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
1 change: 0 additions & 1 deletion Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ bin_SCRIPTS += scripts/rename-image.pl
bin_SCRIPTS += scripts/show-image-storage.pl
bin_SCRIPTS += scripts/vyatta-op-cmd-wrapper

sbin_SCRIPTS = scripts/vyatta-image-tools.pl

all-local:
./gen-unpriv-commands.sh
Expand Down
20 changes: 11 additions & 9 deletions functions/interpreter/vyatta-image-complete
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,14 @@ _vyatta_image_file_complete()
_vyatta_op_completions=( "" " " )
return 0;
fi

_vyatta_image_path_complete
}

declare -a non_comps=( "http://<user>:<passwd>@<host>/<file>" \
declare -a non_comps=( "http(s)://<user>:<passwd>@<host>/<file>" \
"scp://<user>:<passwd>@<host>/<file>" \
"ftp://<user>:<passwd>@<host>/<file>" \
"sftp://<user>:<passwd>@<host>/<file>" \
"ftp(s)://<user>:<passwd>@<host>/<file>" \
"tftp://<host>/<file>" )

_vyatta_image_path_complete()
Expand All @@ -79,9 +81,9 @@ _vyatta_image_path_complete()
for i in `seq 0 $[${#reply[@]}-1]`; do
file=${reply[$i]}
reply[$i]=${file/#\/lib\/live\/mount\/persistence\/boot\//}
reply[$i]="${reply[$i]}://config/"
reply[$i]="${reply[$i]}://"
done
reply+=( "running://config/" )
reply+=( "running://" )
if [[ -d /lib/live/mount/persistence/opt/vyatta/etc/config || -d /lib/live/mount/persistence/config ]]; then
reply+=( "disk-install://" )
fi
Expand All @@ -108,13 +110,13 @@ _vyatta_image_path_complete()
for i in `seq 0 $[${#reply[@]}-1]`; do
file=${reply[$i]}
if [[ $isrunningimg == "running" ]];then
reply[$i]="running://config/"
reply[$i]="running://"
elif [[ $isdiskinstall == "disk-install" ]]; then
reply[$i]="disk-install://"
else
reply[$i]=${file/#\/lib\/live\/mount\/persistence\/boot\//}
if [[ -d /ib/live/mount/persistence/boot/${reply[$i]} ]]; then
reply[$i]="${reply[$i]/#\//}://config/"
if [[ -d /lib/live/mount/persistence/boot/${reply[$i]} ]]; then
reply[$i]="${reply[$i]/#\//}://"
fi
fi
done
Expand All @@ -125,9 +127,9 @@ _vyatta_image_path_complete()
if [[ $topdir == "running" ]]; then
cur="/${cur}"
elif [[ $topdir == "disk-install" ]]; then
cur="/ib/live/mount/persistence/${cur}"
cur="/lib/live/mount/persistence/${cur}"
else
cur="/ib/live/mount/persistence/boot/${topdir}/rw/${cur}"
cur="/lib/live/mount/persistence/boot/${topdir}/rw/${cur}"
fi
reply=( $(compgen -f ${cur}) )
# for loop from _filedirs() in /etc/bash_completion
Expand Down
4 changes: 3 additions & 1 deletion functions/interpreter/vyatta-op-run
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,9 @@ _vyatta_op_run ()
local run_cmd=$(_vyatta_op_get_node_def_field $tpath/node.def run)
run_cmd=$(_vyatta_op_conv_run_cmd "$run_cmd") # convert the positional parameters
local ret=0
local cmd_regex="^(LESSOPEN=|less|pager|tail|/opt/vyatta/bin/vyatta-tshark-interface-port.pl).*"
# Exception for the `show file` command
local file_cmd='\$\{vyos_op_scripts_dir\}\/file\.py'
local cmd_regex="^(LESSOPEN=|less|pager|tail|(sudo )?$file_cmd).*"
if [ -n "$run_cmd" ]; then
eval $restore_shopts
if [[ -t 1 && "${args[1]}" == "show" && ! $run_cmd =~ $cmd_regex ]] ; then
Expand Down
289 changes: 0 additions & 289 deletions scripts/vyatta-image-tools.pl

This file was deleted.

1 change: 0 additions & 1 deletion templates/clone/node.def

This file was deleted.

1 change: 0 additions & 1 deletion templates/clone/system/config/node.def

This file was deleted.

1 change: 0 additions & 1 deletion templates/clone/system/config/node.tag/from/node.def

This file was deleted.

18 changes: 0 additions & 18 deletions templates/clone/system/config/node.tag/from/node.tag/node.def

This file was deleted.

Loading
Loading