From c533cf7e77bbdfbb9258a558ff750ee80e36cec9 Mon Sep 17 00:00:00 2001 From: A Holt Date: Mon, 19 Oct 2020 03:01:57 -0700 Subject: [PATCH] Update local_facts.fact --- scripts/local_facts.fact | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/local_facts.fact b/scripts/local_facts.fact index 35b409493..70c14713d 100755 --- a/scripts/local_facts.fact +++ b/scripts/local_facts.fact @@ -4,12 +4,12 @@ # interruptions return last stage number recorded (1-9) if [ -f /etc/iiab/iiab.env ]; then source /etc/iiab/iiab.env - STAGE=$STAGE + STAGE=$STAGE # What does this line do? else STAGE=0 fi -OS=`grep ^ID= /etc/*elease|cut -d= -f2` +OS=`grep ^ID= /etc/*elease | cut -d= -f2` OS=${OS//\"/} if [ -f /etc/rpi-issue ]; then OS="raspbian" @@ -50,12 +50,10 @@ COMMIT=`git rev-parse --verify HEAD` if [ -d /usr/lib64/php ]; then PHPLIB_DIR=/usr/lib64/php +elif [ -d /usr/lib/php5 ]; then + PHPLIB_DIR=/usr/lib/php5 else - if [ -d /usr/lib/php5 ]; then - PHPLIB_DIR=/usr/lib/php5 - else - PHPLIB_DIR=/usr/lib/php - fi + PHPLIB_DIR=/usr/lib/php fi if [ -f /proc/device-tree/mfg-data/MN ]; then @@ -70,14 +68,14 @@ else RPI_VERSION="none" fi -ANSIBLE_VERSION=$(ansible --version|head -n 1|cut -f 2 -d " ") +ANSIBLE_VERSION=$(ansible --version | head -n 1 | cut -f 2 -d " ") -if [ ! x$DHCPCD_PATH = x ]; then +if [[ $DHCPCD_PATH != "" ]]; then DHCPCD=`systemctl is-enabled dhcpcd` fi # the check is debian family only is_redhat would use NetworkManager as the # service name. -if [ ! x$NM_PATH = x ]; then +if [[ $NM_PATH != "" ]]; then NM=`systemctl is-enabled network-manager` fi SYSD_NETD=`systemctl is-enabled systemd-networkd`