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
|
#!/bin/sh
echo "*** This is upgrade script for Tucnak"
echo "*** Please follow instructions below"
echo ""
echo "sudo LANG= LC_ALL= dpkg -i '$1' '$2'"
LANG= LC_ALL= sudo dpkg -i "$1" "$2"
if test x"$?" = x"0" ; then
echo "*** Seems OK. Please restart Tucnak"
exit 0
else
echo "*** sudo returns $?, falling to su"
fi
echo "*** Please enter root's password"
echo su -l -c dpkg -i "$1" "$2" root
su -l -c "dpkg -i \"$1\" \"$2\"" root
if test x"$?" = x"0" ; then
echo "*** Seems OK. Please restart Tucnak"
exit 0
else
echo "*** su returns $?, giving up"
echo "*** Please run as root: dpkg -i '$1' '$2'"
exit 1
fi
|