pauper 0.1.16 → 0.1.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/bin/pauper +1 -0
- data/lib/pauper.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff61589708789bacee3de7073cd4c2f796a91e06
|
4
|
+
data.tar.gz: 28071b91f41a77ca52cdcff1fb5a35ca957c8bdb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 443bdec50d5c697e5b4e0a6fce3dda6b3435dabd614c095829939f9c384e7f52622f7188e9180e550c0af8ce13a39483a8764d559243fe707d242050ae05096c
|
7
|
+
data.tar.gz: a7718fe5d5b834900e515623865e15a1b9f2e0f9bee0ab0804351a10052ba7cfa93ad46554cd608a4a1b0a3ad7a97ec4d0ec505232aa38c6980b3f1517095226
|
data/bin/pauper
CHANGED
data/lib/pauper.rb
CHANGED
@@ -17,12 +17,21 @@ class Pauper
|
|
17
17
|
DEFAULT_VM_PATH = File.expand_path('/var/lib/lxc/')
|
18
18
|
|
19
19
|
def initialize(pauperfile=DEFAULT_PAUPERFILE)
|
20
|
+
if root?
|
21
|
+
puts "Don't run as root!"
|
22
|
+
exit
|
23
|
+
end
|
24
|
+
|
20
25
|
@pauper_config = Pauper::Config.new(DEFAULT_PAUPERFILE)
|
21
26
|
network = LIBVIRT.new(@pauper_config.config[:subnet])
|
22
27
|
network.enable
|
23
28
|
@pauper_config.config[:bridge] = network.interface
|
24
29
|
end
|
25
30
|
|
31
|
+
def root?
|
32
|
+
Process.euid == 0
|
33
|
+
end
|
34
|
+
|
26
35
|
def config
|
27
36
|
@pauper_config
|
28
37
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pauper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.17
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tyler McMullen
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-12-
|
12
|
+
date: 2013-12-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|