Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

make install: do install sudoers rules

  • Loading branch information...
commit e0549e24593f4bcae729b5800281f5dcf2b66afc 1 parent 99ec0ed
Aleksey Morarash authored October 03, 2012

Showing 2 changed files with 13 additions and 2 deletions. Show diff stats Hide diff stats

  1. 13  Makefile
  2. 2  sudoers
13  Makefile
... ...
@@ -1,17 +1,26 @@
1  
-.PHONY: install uninstall clean
  1
+.PHONY: install uninstall clean sudoers
2 2
 
3  
-install:
  3
+install: sudoers
4 4
 	install --mode=755 --directory /etc/yabs
5 5
 	install --mode=644 repo.list /etc/yabs
6 6
 	install --mode=755 yabs-worker.sh /usr/sbin/yabs-worker
7 7
 	install --mode=755 yabs.sh /usr/bin/yabs
  8
+	install --mode=755 --directory /etc/sudoers.d
  9
+	install --mode=440 sudoers /etc/sudoers.d/yabs
8 10
 
9 11
 uninstall:
10 12
 	rm --recursive --force \
11 13
 		/etc/yabs \
  14
+		/etc/sudoers.d/yabs \
12 15
 		/usr/bin/yabs \
13 16
 		/usr/sbin/yabs-worker
14 17
 
  18
+sudoers:
  19
+	mkdir --parents /etc/sudoers.d
  20
+	grep --quiet --extended-regexp \
  21
+		'^#includedir\s+/etc/sudoers.d/?$' /etc/sudoers ||
  22
+	echo '#includedir /etc/sudoers.d' >> /etc/sudoers
  23
+
15 24
 clean:
16 25
 	find . -name '*~' -delete
17 26
 
2  sudoers
... ...
@@ -0,0 +1,2 @@
  1
+jenkins ALL=NOPASSWD: /usr/sbin/yabs-worker
  2
+jenkins ALL=NOPASSWD: /usr/bin/createrepo

0 notes on commit e0549e2

Please sign in to comment.
Something went wrong with that request. Please try again.