export HDAIP=`ifconfig eth0 | grep "inet addr" | awk '{ print $2 }' | awk 'BEGIN { FS=":" } { print $2 }'`;
* First Admin User:
export FUSER=`/var/hda/platform/html/script/first-admin`or export FUSER=$(echo "SELECT MIN(login) FROM users WHERE admin=1" | mysql hda_production -uamahihda -pAmahiHDARulez -s)
* Check OS Version:
export FVER=`cat /etc/fedora-release | awk -F'release ' '{print $2}' | sed 's/(Laughlin)//'`;
if [ $FVER == '14' ]; then
...
fi
or
export FVER=`cat /etc/fedora-release | awk -F'release ' '{print $2}' | sed 's/(Verne)//'`;
if [ $FVER == '16' ]; then
...
fi
* Install Ubuntu (DEB) or Fedora (RPM) package
if [ -f /etc/fedora-release ]; then
yum localinstall -y package.rpm --nogpgcheck
fi
if [ -f /etc/lsb-release ]; then
dpkg -i package.deb
fi