01_sudo.sh 1.06 KB
Newer Older
1
#!/bin/bash
2
sudo -n bash -c 'echo OK' >/dev/null
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
if [ $? -ne 0 ] ; then
    echo You need to install and configure password-less sudo.
    echo "The update process touches system files, so, from a root account:"
    echo
    echo "    sudo apt-get install sudo"
    echo
    echo "...and then add this line to /etc/sudoers :"
    echo
    echo "    $USER  ALL=(root) NOPASSWD: ALL"
    echo
    echo "You can then re-run Update-TASTE.sh".
    echo
    echo "If you don't feel comfortable with giving sudo credentials to the"
    echo "update scripts, remember that you can apply this process in a chroot,"
    echo "or in a VM ; and you can also use the pre-built TASTE VM or use our"
    echo "Vagrant/Docker support to automatically build a sandboxed 'machine'."
    echo "The scripts are open for reviewing anyway - they exist under the"
    echo "install/ folder."
    exit 1
fi
23 24 25 26 27 28
touch /dev/shm/foo || {
    echo "Your user doesn't seem to be able to write inside /dev/shm/"
    echo "Fix it by executing something like..."
    echo "    sudo chmod ugo+w /dev/shm/"
    exit 1
}