#!/bin/bash

# check RBAC permissions
if ! /fabos/libexec/rbac_check ${0##*/}
then
	exit 127
fi

if [ "$1" == "--show" ] && [ "$2" == "" ] ; then
	/usr/bin/bzcat /fabos/etc/openSource.bz2 2> /dev/null |
		/usr/bin/less -P "Type <CR> or <SPACE BAR> to continue, <q> to stop" -e
elif [ "$1" == "--help" ] && [ "$2" == "" ] ; then
        echo "opensource {--show | --help}"
        echo "Options: --show Show Open Source Attribution File"
        echo "         --help Display the command usage"
else
        echo "Invalid option"
        echo "opensource {--show | --help}"
        echo "Options: --show Show Open Source Attribution File"
        echo "         --help Display the command usage"
fi

