]> rtime.felk.cvut.cz Git - novaboot.git/commitdiff
Add sudoers template
authorMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Jul 2014 11:05:25 +0000 (13:05 +0200)
committerMichal Sojka <sojkam1@fel.cvut.cz>
Thu, 17 Jul 2014 11:05:25 +0000 (13:05 +0200)
Makefile
sudoers.novaboot [new file with mode: 0644]

index 9ebd017f3387c7fea6e5d794bc8347129d1dac68..1565579adbe384c822f7cf6727e86db2537baeb4 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -11,6 +11,8 @@ install:
        install -m 755 novaboot $(DESTDIR)$(PREFIX)/bin
        install -d $(DESTDIR)$(PREFIX)/share/man/man1/
        pod2man novaboot $(DESTDIR)$(PREFIX)/share/man/man1/novaboot.1
+       install -d $(DESTDIR)/etc/sudoers.d
+       install -m 440 sudoers.novaboot $(DESTDIR)/etc/sudoers.d/novaboot
 
 test:
        $(MAKE) -C tests
diff --git a/sudoers.novaboot b/sudoers.novaboot
new file mode 100644 (file)
index 0000000..4404cc0
--- /dev/null
@@ -0,0 +1,9 @@
+# Recommended sudo configuration for novaboot
+
+# Uncomment the following lines to enable --dhcp-tftp option
+# Cmnd_Alias NOVABOOT_DHCP = /bin/ip a add 10.23.23.1/24 dev eth0, /bin/ip l set dev eth0 up, /usr/sbin/dhcpd -d -cf dhcpd.conf -lf dhcpd.leases -pf dhcpd.pid, /usr/bin/touch dhcpd.leases, /usr/bin/pkill --pidfile=dhcpd.pid
+# your_login ALL=NOPASSWD: NOVABOOT_DHCP
+
+# Uncomment the following lines to enable --dhcp-tftp and --tftp options
+# Cmnd_Alias NOVABOOT_TFTP =  /usr/sbin/in.tftpd --foreground --secure -v -v -v --pidfile tftpd.pid *, /usr/bin/pkill --pidfile=tftpd.pid
+# your_login ALL=NOPASSWD: NOVABOOT_TFTP