init style cleanup
This commit is contained in:
@@ -109,23 +109,22 @@ def main():
|
|||||||
fh.write("""
|
fh.write("""
|
||||||
description "AutoImage"
|
description "AutoImage"
|
||||||
|
|
||||||
start on stopped rc RUNLEVEL=[2345]
|
start on runlevel [2345]
|
||||||
|
|
||||||
stop on runlevel [!2345]
|
|
||||||
|
|
||||||
script
|
script
|
||||||
|
exec </dev/tty7 >/dev/tty7 2>&1
|
||||||
chvt 7
|
chvt 7
|
||||||
/autoimage/client/wait_for_service.py --host=%(host)s --service=%(service)s </dev/tty7 >/dev/tty7 2>&1
|
/autoimage/client/wait_for_service.py --host=%(host)s --service=%(service)s
|
||||||
chvt 7
|
chvt 7
|
||||||
/autoimage/imager/image.py --device=%(device)s --persistent-percent=%(persistent_percent)d --ca-cert=/autoimage/config/ca.cert.pem --base-url=%(base_url)s %(image_flags)s </dev/tty7 >/dev/tty7 2>&1
|
/autoimage/imager/image.py --device=%(device)s --persistent-percent=%(persistent_percent)d --ca-cert=/autoimage/config/ca.cert.pem --base-url=%(base_url)s %(image_flags)s
|
||||||
chvt 7
|
chvt 7
|
||||||
|
|
||||||
echo >/dev/tty7
|
echo
|
||||||
echo "==================" >/dev/tty7
|
echo "=================="
|
||||||
echo "autoimage complete" >/dev/tty7
|
echo "autoimage complete"
|
||||||
echo "==================" >/dev/tty7
|
echo "=================="
|
||||||
|
|
||||||
/autoimage/client/alert.py --type=happy </dev/tty7 >/dev/tty7
|
/autoimage/client/alert.py --type=happy
|
||||||
end script
|
end script
|
||||||
""" % {
|
""" % {
|
||||||
'host': parsed.hostname,
|
'host': parsed.hostname,
|
||||||
|
|||||||
@@ -22,9 +22,13 @@ def main():
|
|||||||
description "Mount /persistent"
|
description "Mount /persistent"
|
||||||
|
|
||||||
start on filesystem
|
start on filesystem
|
||||||
|
task
|
||||||
|
|
||||||
|
emits persistent-ready
|
||||||
|
|
||||||
script
|
script
|
||||||
mount LABEL=PERSISTENT /persistent
|
mount LABEL=PERSISTENT /persistent
|
||||||
|
initctl emit --no-wait persistent-ready
|
||||||
end script
|
end script
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|||||||
@@ -22,6 +22,9 @@ def main():
|
|||||||
description "Mount /systemid"
|
description "Mount /systemid"
|
||||||
|
|
||||||
start on filesystem
|
start on filesystem
|
||||||
|
task
|
||||||
|
|
||||||
|
emits systemid-ready
|
||||||
|
|
||||||
script
|
script
|
||||||
mount LABEL=SYSTEMID /systemid
|
mount LABEL=SYSTEMID /systemid
|
||||||
@@ -29,6 +32,7 @@ script
|
|||||||
echo ${SYSTEMID} > /etc/hostname
|
echo ${SYSTEMID} > /etc/hostname
|
||||||
hostname --file /etc/hostname
|
hostname --file /etc/hostname
|
||||||
grep ${SYSTEMID} /etc/hosts >/dev/null || echo "127.0.2.1 ${SYSTEMID}" >> /etc/hosts
|
grep ${SYSTEMID} /etc/hosts >/dev/null || echo "127.0.2.1 ${SYSTEMID}" >> /etc/hosts
|
||||||
|
initctl emit --no-wait systemid-ready
|
||||||
end script
|
end script
|
||||||
""")
|
""")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user