#!/bin/sh
#   Copyright (c) by Falcony (2:5020/828.777). This file is part of fidoip. It is free software and it is covered
#   by the GNU general public license. See the file LICENSE for details. */
#  Shows list additional links in INSTALLDIR/usr/etc/fido/link.lst
SYSOS=`uname -s` # Packages architecture
OSTYPE=`uname -o 2>/dev/null || uname -p` 
TMP=`mktemp -d`	# Location of temp's files
SEDT="sed"  # Sed program type

T1="root"
T2="Linux"
T3="FreeBSD"
T4="DragonFly"
T5="NetBSD"
T6="OpenBSD"
T7="Cygwin" 
T8="Msys" 

if [ "$SYSOS" = "$T2" ]; then
Z1="Linux"
SEDT="sed"
fi

if [ "$SYSOS" = "$T3" ]; then
Z1="BSD"
SEDT="gsed"
fi

if [ "$SYSOS" = "$T4" ]; then
Z1="BSD"
Z2="PKGSRC"
SEDT="gsed"
fi

if [ "$SYSOS" = "$T5" ]; then
Z1="BSD"
Z2="PKGSRC"
SEDT="gsed"
fi

if [ "$SYSOS" = "$T6" ]; then
Z1="BSD"
SEDT="gsed"
fi

if [ "$OSTYPE" = "Cygwin" ]; then
Z1="Cygwin"
SEDT="sed"
fi

if [ "$OSTYPE" = "Msys" ]; then
Z1="Msys"
SEDT="sed"
fi


echo "#==================================================="
echo "# This script list links of fidoip's FIDONet node."
echo "#==================================================="
echo

echo "#==================================================="
echo "# Here is links in configuration file"
echo "# INSTALLDIR/usr/etc/fido/link.lst:"
echo "#==================================================="
cat INSTALLDIR/usr/etc/fido/link.lst | grep -v "#" | grep "Link " 
echo "#==================================================="
echo
echo "#==================================================="
echo "# Here is Aka of links in configuration file"
echo "# INSTALLDIR/usr/etc/fido/link.lst:"
echo "# ==================================================="
cat INSTALLDIR/usr/etc/fido/link.lst | grep -v "#" | grep "Aka " 
echo "# ==================================================="
echo
echo "#==================================================="
echo "# Here is passwords of links in configuration file"
echo "# INSTALLDIR/usr/etc/fido/link.lst:"
echo "# ==================================================="
cat INSTALLDIR/usr/etc/fido/link.lst | grep -v "#" | grep "password " 
echo "# ==================================================="
rm -rf $TMP

