#!/bin/sh -e

set -e

add_sudoer ()
{
    line="$1"
    if ! grep -F -q "$line" /etc/sudoers; then
	echo "+$line"
	chmod u+w /etc/sudoers # *cough*
	echo "$line" >>/etc/sudoers
	chmod u-w /etc/sudoers
    fi
}

add_sudoer 'user ALL = NOPASSWD: /usr/sbin/synaptic'
exit 0
