Changes

From Amahi Wiki
Jump to: navigation, search
194 bytes removed ,  21:47, 12 January 2014
===Scripted Functions===
* Network Interface Name:
INTFCHDA_DEVICE=`ifconfig | expand | cut -c1-8 | sort | uniq -u ip route | awk -F: '/^default/ {print printf $1;5 }' | grep -Fvx -e lo | grep -Fvx -e tun0` or  INTFC=cat /etc/sysconfig/network-scripts/ifcfg-* | grep -m 1 NAME | sed 's/NAME="//' | sed 's/"//'`;
* Fully Qualified Domain Name:
HSTNM=`hostname -f`
else
DOMNM=$GRP'.'$DOM
fi
* Arch (32- or 64-bit):
ARCH=`getconf LONG_BIT`
if [ "$ARCH" = "64" ]; then
# 64-bit
else
# 32-bit
fi
* HDA Domain Name:
HDADOM=`cat /etc/resolv.conf | grep 'search' | awk '{ print $2 }'`;
 
or
 
HDADOM=$(echo "SELECT value FROM settings WHERE name='domain'" | mysql hda_production -uamahihda -pAmahiHDARulez -s)
* HDA IP Address
HDAIP=`ifconfig $INTFC | grep "inet (/sbin/ip -o -4 addr" list $HDA_DEVICE | awk '{ print $2 4}' | awk 'BEGIN { FS=":" } { print $2 }'`cut -d/ -f1)
or
 
HDAIP=$(/sbin/ip -o -4 addr list $INTFC | awk '{print $4}' | cut -d/ -f1)
* First Admin User:
or
FUSER=$(echo "SELECT login FROM users WHERE admin=1 ORDER BY id ASC LIMIT 1" | mysql hda_production -uamahihda -pAmahiHDARulez -s)
* Arch (32- or 64-bit):
ARCH=`getconf LONG_BIT`
if [ "$ARCH" = "64" ]; then
# 64-bit
else
# 32-bit
fi
* Check OS Version:
FVER=`cat /etc/fedora-release | awk -F'release ' '{print $2}' | sed 's/(Laughlin)//'`;
12,424

edits