Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gitlab-ce
Commits
efe90876
Commit
efe90876
authored
Apr 15, 2013
by
Axilleas Pipinellis
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added os_name support for systems running systemd.
parent
a45e4721
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
lib/tasks/gitlab/task_helpers.rake
lib/tasks/gitlab/task_helpers.rake
+4
-1
No files found.
lib/tasks/gitlab/task_helpers.rake
View file @
efe90876
...
...
@@ -16,7 +16,7 @@ namespace :gitlab do
# Check which OS is running
#
# It will primarily use lsb_relase to determine the OS.
# It has fallbacks to Debian, SuSE
and OS X
.
# It has fallbacks to Debian, SuSE
, OS X and systems running systemd
.
def
os_name
os_name
=
run
(
"lsb_release -irs"
)
os_name
||=
if
File
.
readable?
(
'/etc/system-release'
)
...
...
@@ -32,6 +32,9 @@ namespace :gitlab do
os_name
||=
if
os_x_version
=
run
(
"sw_vers -productVersion"
)
"Mac OS X
#{
os_x_version
}
"
end
os_name
||=
if
File
.
readable?
(
'/etc/os-release'
)
File
.
read
(
'/etc/os-release'
).
match
(
/PRETTY_NAME=\"(.+)\"/
)[
1
]
end
os_name
.
try
(
:squish!
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment