Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:onielsen:Virtualization:Testing
opennebula
fix-for-upstream-onedsetup_sleep.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File fix-for-upstream-onedsetup_sleep.patch of Package opennebula
diff -ruN opennebula-5.4.1/share/pkgs/openSUSE/systemd/onedsetup opennebula-5.4.1-new/share/pkgs/openSUSE/systemd/onedsetup --- opennebula-5.4.1/share/pkgs/openSUSE/systemd/onedsetup 2017-09-19 15:03:16.000000000 +0200 +++ opennebula-5.4.1-new/share/pkgs/openSUSE/systemd/onedsetup 2017-12-30 01:31:21.811313592 +0100 @@ -15,6 +15,7 @@ #--------------------------------------------------------------------------- # # One time setup for oned +DB_INIT_MAX_WAIT_SECONDS=30 KILL_9_SECONDS=10 LOCK_FILE=/var/lock/one/one @@ -89,12 +90,22 @@ fi # Give oned a chance to do it's thing... -sleep 5 +echo -n "Waiting for $ONED" +counter=0 +while ps $CURPID > /dev/null 2>&1; do + let counter=counter+1 + if [ $counter -gt $DB_INIT_MAX_WAIT_SECONDS ]; then + # Assume the process is stuck, terminate it + kill -TERM $CURPID > /dev/null 2>&1 + break + fi + echo -n "." + sleep 1 +done +echo "." # OK we're all done here # Just in case the process gets stuck, kill it -kill -TERM $CURPID > /dev/null 2>&1 - counter=0 while ps $CURPID > /dev/null 2>&1; do let counter=counter+1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor