amiral 0.1.1 → 0.1.2
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.
- data/lib/amiral/version.rb +1 -1
- data/lib/amiral.rb +9 -7
- metadata +1 -1
data/lib/amiral/version.rb
CHANGED
data/lib/amiral.rb
CHANGED
@@ -49,7 +49,7 @@ module Amiral
|
|
49
49
|
err = stderr.read
|
50
50
|
}
|
51
51
|
short = "unknown status"
|
52
|
-
case status
|
52
|
+
case status.exitstatus
|
53
53
|
when 0:
|
54
54
|
short = "nothing to do, i'm all good"
|
55
55
|
when 2:
|
@@ -61,7 +61,7 @@ module Amiral
|
|
61
61
|
end
|
62
62
|
|
63
63
|
{
|
64
|
-
:exit => ((status == 0)
|
64
|
+
:exit => ((status.exitstatus == 0)||(status.exitstatus == 2)) ? 0 : 1,
|
65
65
|
:status => status,
|
66
66
|
:short => short,
|
67
67
|
:out => out,
|
@@ -78,8 +78,9 @@ module Amiral
|
|
78
78
|
err = stderr.read
|
79
79
|
}
|
80
80
|
{
|
81
|
-
:exit => status,
|
82
|
-
:short => (status == 0) ? "apt-get update ran fine" :
|
81
|
+
:exit => status.exitstatus,
|
82
|
+
:short => (status.exitstatus == 0) ? "apt-get update ran fine" :
|
83
|
+
"apt-get cannot perform update!",
|
83
84
|
:out => out,
|
84
85
|
:err => err
|
85
86
|
}
|
@@ -103,9 +104,10 @@ module Amiral
|
|
103
104
|
|
104
105
|
}
|
105
106
|
{
|
106
|
-
:exit
|
107
|
-
:short
|
108
|
-
|
107
|
+
:exit => status.exitstatus,
|
108
|
+
:short => (status.exitstatus == 0) ?
|
109
|
+
"service #{service} #{action} successful" :
|
110
|
+
"service #{service} #{action} failed!",
|
109
111
|
:out => out,
|
110
112
|
:err => err
|
111
113
|
}
|