Skip to content

Commit a19857a

Browse files
author
Andrea Righi
authored
Merge pull request #40 from tych0/touch-sudoers-not-exists
Tycho Andersen: - virtme-init: touch /etc/sudoers if it doesn't exist
2 parents ca6ee9e + f15c2a6 commit a19857a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

virtme/guest/virtme-init

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -204,6 +204,9 @@ if [[ -n "virtme_user" ]]; then
204204
echo "root ALL = (ALL) NOPASSWD: ALL" > $tmpfile
205205
echo "${virtme_user} ALL = (ALL) NOPASSWD: ALL" >> $tmpfile
206206
chmod 440 "$tmpfile"
207+
if [ ! -f "$real_sudoers" ]; then
208+
touch "$real_sudoers"
209+
fi
207210
mount --bind "$tmpfile" "$real_sudoers"
208211
fi
209212

0 commit comments

Comments
 (0)