Skip to content

Commit

Permalink
Replace proc_uptime agent by Process.clock_gettime
Browse files Browse the repository at this point in the history
  • Loading branch information
imobachgs committed Mar 8, 2016
1 parent cf43834 commit 24af38b
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 43 deletions.
4 changes: 2 additions & 2 deletions package/autoyast2.changes
@@ -1,8 +1,8 @@
-------------------------------------------------------------------
Wed Feb 24 16:36:20 UTC 2016 - igonzalezsosa@suse.com

- Check /proc/uptime instead of system time while waiting for
systemd services to be restarted (bsc#956730)
- Check uptime instead of system time while waiting for systemd
services to be restarted (bsc#956730)
- 3.1.69.12

-------------------------------------------------------------------
Expand Down
1 change: 0 additions & 1 deletion package/autoyast2.spec
Expand Up @@ -214,7 +214,6 @@ rmdir $RPM_BUILD_ROOT/%{_prefix}/share/doc/packages/autoyast2/html/autoyast
%dir %{yast_scrconfdir}
%{yast_scrconfdir}/autoinstall.scr
%{yast_scrconfdir}/cfg_autoinstall.scr
%{yast_scrconfdir}/proc_uptime.scr
# DTD files
%dir /usr/share/autoinstall
#%dir /usr/share/autoinstall/dtd
Expand Down
3 changes: 1 addition & 2 deletions src/Makefile.am
Expand Up @@ -77,8 +77,7 @@ ylib_DATA = \
scrconf_DATA = \
scrconf/cfg_autoinstall.scr \
scrconf/autoinstall.scr \
scrconf/ksimport.scr \
scrconf/proc_uptime.scr
scrconf/ksimport.scr

agent_SCRIPTS = \
servers_non_y2/ag_ksimport
Expand Down
7 changes: 4 additions & 3 deletions src/clients/inst_autoconfigure.rb
Expand Up @@ -501,10 +501,11 @@ def wait_systemd_finished(max_wait, ser_ignore)

private

# Determines the current uptime
#
# @return [Float] Current uptime
def uptime
proc_uptime = SCR.Read(path(".proc.uptime"))
raise "Could not determine system's uptime" unless proc_uptime && proc_uptime["uptime"]
proc_uptime["uptime"]
Process.clock_gettime(Process::CLOCK_MONOTONIC)
end
end
end
Expand Down
35 changes: 0 additions & 35 deletions src/scrconf/proc_uptime.scr

This file was deleted.

0 comments on commit 24af38b

Please sign in to comment.