Commit 1e121801 authored by Carlos Ramos Carreño's avatar Carlos Ramos Carreño

Switch some commands to more widely available ones.

The commands `wget` and `awk` are not present in the official Docker
base image for SLE 15 SP6 (registry.suse.com/bci/bci-base:15.6).
Although I guess that the lack of the latter means that this image is
not properly POSIX-compliant, I think the easiest solution is to use
`curl` and `sed` instead, which are available.

See merge request nexedi/slapos.core!655
parent d2edd114
......@@ -192,7 +192,7 @@ ansible localhost -m pip -a name=slapcache --connection=local
ansible localhost -m pip -a name=requests --connection=local
if [ ! -f /usr/share/ansible_plugins/mitogen.zip ]; then
wget -O /usr/share/ansible_plugins/mitogen.zip https://shacache.nxdcdn.com/3a935ff257ddc0ad4e0f23d71681e026f14f309f4bed0a8e2a217da9b294be2c676196703f0dde856ece49d711d0221deae70812f035b24aa5cdd0ca02790e85
curl -o /usr/share/ansible_plugins/mitogen.zip https://shacache.nxdcdn.com/3a935ff257ddc0ad4e0f23d71681e026f14f309f4bed0a8e2a217da9b294be2c676196703f0dde856ece49d711d0221deae70812f035b24aa5cdd0ca02790e85
unzip /usr/share/ansible_plugins/mitogen.zip -d /usr/share/ansible_plugins/mitogen/
mv /usr/share/ansible_plugins/mitogen/mitogen-*/* /usr/share/ansible_plugins/mitogen/
fi
......@@ -276,8 +276,8 @@ function GetOSVersion {
fi
if [[ -n "`grep \"$r\" /etc/os-release`" ]]; then
os_CODENAME=$(awk '/VERSION=/' /etc/os-release | sed 's/VERSION=//' | sed 's/\"//g')
os_RELEASE=$(awk '/VERSION_ID=/' /etc/os-release | sed 's/VERSION_ID=//' | sed 's/\"//g')
os_CODENAME=$(sed -n '/^VERSION=/p' /etc/os-release | sed 's/VERSION=//' | sed 's/\"//g')
os_RELEASE=$(sed -n '/^VERSION_ID=/p' /etc/os-release | sed 's/VERSION_ID=//' | sed 's/\"//g')
break
fi
os_VENDOR=""
......
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