diff options
| author | Christian Breunig <christian@breunig.cc> | 2026-07-09 22:21:52 +0200 |
|---|---|---|
| committer | Christian Breunig <christian@breunig.cc> | 2026-07-17 18:10:08 +0200 |
| commit | e0684c0c343835c7674a94424d847592511915b0 (patch) | |
| tree | 9c1deaf6c985ee5a040846ec2cd2f455efc45329 /src/migration-scripts/https/5-to-6 | |
| parent | 43093ec740b6350492e4d4d16617ddf638ee4b94 (diff) | |
| download | vyos-1x-e0684c0c343835c7674a94424d847592511915b0.tar.gz vyos-1x-e0684c0c343835c7674a94424d847592511915b0.zip | |
utils: T9008: migrate remaining cmd() callers to cmdl() and remove cmd()
Complete the safer-subprocess migration started by the cmdl()/ifconfig
refactoring and convert every remaining vyos.utils.process.cmd() call site to
the list-based cmdl().
Drop the vyos.utils.process.cmd() implementation as it is no longer in use.
Diffstat (limited to 'src/migration-scripts/https/5-to-6')
| -rw-r--r-- | src/migration-scripts/https/5-to-6 | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/migration-scripts/https/5-to-6 b/src/migration-scripts/https/5-to-6 index 8c41f4b61..ece407a4b 100644 --- a/src/migration-scripts/https/5-to-6 +++ b/src/migration-scripts/https/5-to-6 @@ -21,7 +21,7 @@ import os from vyos.configtree import ConfigTree from vyos.defaults import directories -from vyos.utils.process import cmd +from vyos.utils.process import cmdl vyos_certbot_dir = directories['certbot'] @@ -45,7 +45,7 @@ def migrate(config: ConfigTree) -> None: # This must be run as root certbot_live = f'{vyos_certbot_dir}/live/' # we need the trailing / if os.path.exists(certbot_live): - tmp = cmd(f'sudo find {certbot_live} -maxdepth 1 -type d') + tmp = cmdl(['find', certbot_live, '-maxdepth', '1', '-type', 'd'], sudo=True) tmp = tmp.split() # tmp = ['/config/auth/letsencrypt/live', '/config/auth/letsencrypt/live/router.vyos.net'] tmp.remove(certbot_live) cert_name = tmp[0].replace(certbot_live, '') |
