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