Verified Commit d50e57a2 authored by David Runge's avatar David Runge
Browse files

Simplifying regex for script download

configs/releng/airootfs/root/.automated_script.sh:
Using only one regex to match http://, https:// or ftp:// endpoints.
parent 2ce375cd
......@@ -15,7 +15,7 @@ automated_script ()
local script rt
script="$(script_cmdline)"
if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
if [[ "${script}" =~ ^((http|https|ftp)://) ]]; then
wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
rt=$?
else
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment