| 1 | #!/bin/bashscip-shell filesystem . . `/bin/bash`. |
| 2 | # This "service" is due to "start on runlevel S and started drbl-client-boot" in /etc/init/rcS.conf failing to wait for drbl-client-boot, here we have a workaround for that. |
| 3 | TIMEOUT=200 |
| 4 | echoscip-shell system . . echo. "Waiting for drbl-client-boot to be finished..." |
| 5 | to_wait="" |
| 6 | while [scip-shell system . . `[`. -z "$to_wait" ]; do |
| 7 | if [scip-shell system . . `[`. -e "/var/run/drbl-client-bootscip-shell filesystem . . `/var/run/drbl-client-boot`." ]; then |
| 8 | echoscip-shell system . . echo. "drbl-client-boot is finished. Starting rcS..." |
| 9 | to_wait="no" |
| 10 | else |
| 11 | sleepscip-shell system . . sleep. 0.1 |
| 12 | TIMEOUT="$(( $TIMEOUT - 1 ))" |
| 13 | if [scip-shell system . . `[`. "$TIMEOUT" -le 0 ]; then |
| 14 | echoscip-shell system . . echo. "Timeout in $0. Starting the rcS services..." |
| 15 | break |
| 16 | fi |
| 17 | fi |
| 18 | done |