瀏覽代碼

Merge "Fix the setup-loopback-device service config for upstart"

pull/143/merge
Ondrej Smola 6 年之前
父節點
當前提交
f7000b4334
共有 1 個檔案被更改,包括 5 行新增7 行删除
  1. +5
    -7
      linux/files/setup-loopback-device.upstart

+ 5
- 7
linux/files/setup-loopback-device.upstart 查看文件

@@ -1,12 +1,10 @@
description "Setup {{ device_name }} device"

start on filesystem
task

pre-start script
if /sbin/losetup {{ device_name }}; then
stop ; exit 0
fi
end script
pre-start exec losetup {{ device_name }} {{ file }}
post-stop exec losetup -d {{ device_name }}

exec losetup {{ device_name }} {{ file }}
script
while losetup {{ device_name }} ; do sleep 60 ; done
end script

Loading…
取消
儲存