We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent c6e2fb5 commit f8c19feCopy full SHA for f8c19fe
1 file changed
nfsexports-setsudoaccess
@@ -1,8 +1,33 @@
1
#!/usr/bin/env bash
2
3
+#---------------------------------------------------------------------
4
+usage ()
5
+{
6
+ cat <<EOT
7
+
8
+${0##*/}
9
+ Script to inject the proper command exceptions into a system's
10
+ /etc/sudoers file to allow vagrant to modify /etc/exports for
11
+ NFS shared folder use without prompting the user for an
12
+ administrator password during \`vagrant up\`.
13
+ See: https://docs.vagrantup.com/v2/synced-folders/nfs.html
14
+ Has no effect if run repeatedly.
15
16
+Usage:
17
+ bin/${0##*/}
18
19
20
+EOT
21
22
+ exit 0
23
+}
24
+if [ "$1" = '-h' ]; then
25
+ usage
26
+fi
27
28
# Make sure only root can run our script
29
if [[ $EUID -ne 0 ]]; then
- echo "This script must be run using sudo" 1>&2
30
+ echo "!! This script must be run using sudo." 1>&2
31
exit 1
32
fi
33
0 commit comments