summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xtools/uncloud-init7
1 files changed, 5 insertions, 2 deletions
diff --git a/tools/uncloud-init b/tools/uncloud-init
index c0bc0b4f..0e2a03df 100755
--- a/tools/uncloud-init
+++ b/tools/uncloud-init
@@ -10,11 +10,14 @@
KEY="xupdate"
UMOUNT=""
RMDIR=""
-MARK=/root/uncloud-init-ran
+MARK=/var/lib/cloud/sem/uncloud-init.once
ROOT_RW=""
doexec() {
- [ -z "$ROOT_RW" ] || date > "${MARK}";
+ if [ -n "$ROOT_RW" ]; then
+ mkdir -p "${MARK%/*}";
+ date > "${MARK}";
+ fi
cleanup;
log "invoking /sbin/init $*"
exec /sbin/init "$@";