Kaynağa Gözat

Fix the setup-loopback-device service config for upstart

When we use the upstart, setup-loopback should be running as a
service to pass the salt linux.storage.loopback state
(service.running).

Change-Id: I9b19a94126b497d89bd6d05f43dca1df0304c0c6
Closes-bug: PROD-19847
pull/143/merge
ibumarskov 6 yıl önce
ebeveyn
işleme
f823f3b49a
1 değiştirilmiş dosya ile 5 ekleme ve 7 silme
  1. +5
    -7
      linux/files/setup-loopback-device.upstart

+ 5
- 7
linux/files/setup-loopback-device.upstart Dosyayı Görüntüle

@@ -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

Yükleniyor…
İptal
Kaydet