#!/bin/sh
# copyright (C) 2013 FUJITSU LIMITED All Rights Reserved

# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License
# as published by the Free Software Foundation; version 2
# of the License.
# 
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
# 
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  
# 02110-1301, USA.

if [ -e /etc/lxcf/container_name ] ; then
  echo "The lxcf command is executed in the LXCF container. "
  exit -1
fi

export PATH=/usr/lib/lxcf/sbin:${PATH}

if [ $# -eq 0 ] ; then
  echo
  echo "                  LXCF 0.1 "
  echo "      GNU GENERAL PUBLIC LICENSE Version 2"
  echo "     Type:  'helpcmd' for help with commands"
  echo "            'exit' or '^d' to quit"
  echo
  PS1="LXCF # " /usr/bin/bash
  exit 0
else 
  exec $*
fi

exit 0
  
