mirror of
https://github.com/iiab/iiab.git
synced 2025-02-12 11:12:06 +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
|
||||
fi
|
||||
# Ubuntu desktop might be using NM - split out.
|
||||
# if [ $(which nmcli) ]; then
|
||||
# if [[ `which nmcli` ]]; then
|
||||
if which nmcli; then
|
||||
# if [ $(which nmcli) ]; then # syntax fails when multiple lines returned
|
||||
# if [[ `which nmcli` ]]; then # syntax also works
|
||||
if which nmcli; then # syntax works great, with "grep -q" too!
|
||||
nmcli d >> iiab-network.log
|
||||
nmcli c >> iiab-network.log
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue