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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
bd405791
Commit
bd405791
authored
Apr 18, 2013
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3603 from axilleas/os-name
Added os_name support for systems running systemd.
parents
0f758405
efe90876
Changes
1
Show 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 @
bd405791
...
...
@@ -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