mirror of
https://github.com/iiab/iiab.git
synced 2025-02-15 04:32:11 +00:00
clarif: "if <command>; then" works with "grep -q" etc
This commit is contained in:
parent
ea2c395fc9
commit
f9593392e1
1 changed files with 3 additions and 3 deletions
|
@ -32,9 +32,9 @@ if [ "OS" == "centos" ] || [ "OS" == "fedora" ]; then
|
||||||
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
ls -la /etc/sys*/net*/ifcfg* >> iiab-network.log
|
||||||
fi
|
fi
|
||||||
# Ubuntu desktop might be using NM - split out.
|
# Ubuntu desktop might be using NM - split out.
|
||||||
# if [ $(which nmcli) ]; then
|
# if [ $(which nmcli) ]; then # syntax fails when multiple lines returned
|
||||||
# if [[ `which nmcli` ]]; then
|
# if [[ `which nmcli` ]]; then # syntax also works
|
||||||
if which nmcli; then
|
if which nmcli; then # syntax works great, with "grep -q" too!
|
||||||
nmcli d >> iiab-network.log
|
nmcli d >> iiab-network.log
|
||||||
nmcli c >> iiab-network.log
|
nmcli c >> iiab-network.log
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue