#!/bin/bash ok=0 while [ "$ok" == 0 -a ! -s /var/run/rebootctl ]; do X $@ ok=$? done