-- diese und die folgenden Zeilen werden ignoriert -- A https://svn.systemausfall.org/svn/cryptobox/branches/luks
44 lines
1.3 KiB
Bash
Executable file
44 lines
1.3 KiB
Bash
Executable file
#!/bin/sh
|
|
set -eu
|
|
#
|
|
# we give some hints for users, sitting in front of the cryptobox waiting for a login prompt
|
|
#
|
|
|
|
# parse config file
|
|
. /etc/cryptobox/cryptobox.conf
|
|
|
|
case "$1" in
|
|
start )
|
|
# check if we are on a developers CryptoBox
|
|
# if not give some usage hints
|
|
# otherwise give a warning and start the devel features
|
|
if [ ! -e "$DEV_FEATURES_SCRIPT" ]; then
|
|
echo
|
|
echo "Hints for usage:"
|
|
echo " * for some reasons you can not login here :)"
|
|
echo " * point a webbrowser from another computer to 'http://$(/usr/lib/cryptobox/cbox-manage.sh get_current_ip)'"
|
|
echo " * configure your CryptoBox via a webbrowser"
|
|
echo
|
|
else
|
|
echo
|
|
echo "#---------------------------------------------------------------#"
|
|
echo "| WARNING: Some CryptoBox development features are enabled |"
|
|
echo "| This should definitely NOT happen for a production CD. |"
|
|
echo "| as it offers no security at all. |"
|
|
echo "| If you don't plan to refine this CD, don't use it! |"
|
|
echo "#---------------------------------------------------------------#"
|
|
echo
|
|
$DEV_FEATURES_SCRIPT "$@"
|
|
fi
|
|
;;
|
|
stop )
|
|
;;
|
|
restart )
|
|
$0 stop
|
|
$0 start
|
|
;;
|
|
* )
|
|
echo "Syntax: $0 { start | stop | restart }"
|
|
;;
|
|
esac
|
|
|