1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53
|
#!/bin/bash
# bash is used because easydialog requires bash for some functions
#$lessdisks_path/usr/sbin/lessdisks-terminal-setup
# this script is run when configuring a new terminal
# typically this is only used for non-graphical terminals.
# it merely calls the lessdisks-setup script on the server anyways.
# copyright 2004 vagrant@freegeek.org, distributed under the terms of the
# GNU General Public License version 2 or any later version.
lessdisks_setup="/usr/sbin/lessdisks-setup"
. /etc/lessdisks/server.config
if [ -z "$rw" ]
then
rw="/var/state/lessdisks/"
fi
if [ -z "$export_type" ]
then
echo "WARNING: no export type defined..."
else
# TODO check to make sure export is not already running..
. /usr/sbin/lessdisks-export
fi
. $rw/etc/config
PATH="/usr/local/lib/easydialog:/usr/share/easydialog:/usr/lib/easydialog:$PATH" . easydialog.sh
if [ -z $(which ssh) ]
then
msgBox "ssh not found" "please install ssh into the terminal root filesystem, $lessdisks_path"
exit 1
fi
inputBox "which user" "please enter a username on $disk_server in the group $lessdisks_group"
username="$REPLY"
if [ -z "$DISPLAY" ]
then
ssh="ssh"
else
ssh="ssh -X"
fi
# the -t option forces tty allocation, without it easydialog
# menus fail
$ssh -t $username@$disk_server $lessdisks_setup $ipaddress
|