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 54 55 56 57 58 59 60 61 62
|
# /usr/share/lessdisks/terminal-types/rc.xterminal
# called by /etc/init.d/lessdisks
#this script will set up the appropriate symbolic links for
#$rw/etc/X and $rw/etc/XF86Config
# copyright 2004 vagrant@freegeek.org, distributed under the terms of the
# GNU General Public License version 2 or any later version.
if [ -z "$rw" ]
then
rw="/var/state/lessdisks"
fi
. $rw/etc/config
if [ -r /etc/lessdisks/x.config ]; then
. /etc/lessdisks/x.config
fi
if [ "yes" = "$disk_xapp_same" ]; then
disk_xapp_same=true
fi
if [ "true" = "$disk_xapp_same" ]; then
cp $rw/etc/hosts $rw/etc/hosts.bak
# TODO make the sed more robust
sed s/disk/disk\ xapp/g $rw/etc/hosts.bak > $rw/etc/hosts
fi
if [ "default" = "$hostname" ]; then
. /usr/share/lessdisks/terminal-types/autoconfig.xterminal
fi
terminalconfig="/etc/lessdisks/terminals/$hostname"
if [ -r "$terminalconfig" ]; then
. $terminalconfig
else
echo "$terminalconfig not found..."
fi
if [ -z "$xserver" ]; then
echo "no X server defined.. did you want one configured?"
echo "look in /etc/lessdisks/terminals/$hostname to configure,"
echo "or run lessdisks-setup"
elif [ -x "$xserver" ]; then
ln -s $xserver $rw/etc/X
elif [ -x /usr/X11R6/bin/"$xserver" ]; then
ln -s /usr/X11R6/bin/$xserver $rw/etc/X
elif [ -x /usr/X11R6/bin/XF86_"$xserver" ]; then
ln -s /usr/X11R6/bin/XF86_$xserver $rw/etc/X
elif [ -x /usr/bin/"$xserver" ]; then
ln -s /usr/bin/$xserver $rw/etc/X
else
echo "xserver $xserver could not be found..."
fi
if [ -r /etc/lessdisks/terminals/XF86Config.$hostname ] && [ -n "$xf86config" ] ; then
if [ ! -r $xf86config ]; then
ln -s /etc/lessdisks/terminals/XF86Config.$hostname $xf86config
fi
fi
|