From cba4e106cb893b22d8803eb42136c470085a5056 Mon Sep 17 00:00:00 2001 From: Marc Fiuczynski Date: Mon, 10 Sep 2007 19:39:10 +0000 Subject: [PATCH] make sure 'build' user has proper sudoers setup --- make.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/make.sh b/make.sh index d2073643..32647a49 100755 --- a/make.sh +++ b/make.sh @@ -17,7 +17,7 @@ # Mark Huang # Copyright (C) 2007 The Trustees of Princeton University # -# $Id$ +# $Id: make.sh,v 1.2 2007/02/07 23:49:42 mlhuang Exp $ # PATH=/sbin:/bin:/usr/sbin:/usr/bin @@ -46,6 +46,11 @@ trap "cleanup" ERR INT # Start development environment sudo $BASE/BUILD/myplc-devel-*/myplc/host.init start +# Make sure "build" user has proper sudoers setup +if [ $(sudo grep "build.*ALL=(ALL).*NOPASSWD:.*ALL" $PLC_ROOT/etc/sudoers | wc -l) -eq 0 ] ; then + sudo echo "build ALL=(ALL) NOPASSWD: ALL" >> $PLC_ROOT/etc/sudoers +fi + # Cross mount the current build directory to the build user home directory sudo mount -o bind,rw $BASE $PLC_ROOT/data/build -- 2.47.0