From 58622fa5b64ec2ca043fe4507eb9f398963fdbd9 Mon Sep 17 00:00:00 2001 From: Disassembler Date: Fri, 31 Aug 2018 09:13:18 +0200 Subject: [PATCH] Rebuild /etc/issue on every boot --- basic/etc/inittab | 1 + basic/srv/spotter/cli.py | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/basic/etc/inittab b/basic/etc/inittab index 2cb0b4d..a56b0af 100644 --- a/basic/etc/inittab +++ b/basic/etc/inittab @@ -5,6 +5,7 @@ ::wait:/sbin/openrc default >/dev/null 2>&1 # Set up getty +::wait:/usr/bin/spotter-appmgr rebuild-issue >/dev/null 2>&1 tty1::respawn:/sbin/getty -l /sbin/nologin 38400 tty1 # Stuff to do for the 3-finger salute diff --git a/basic/srv/spotter/cli.py b/basic/srv/spotter/cli.py index 159301d..1864ece 100755 --- a/basic/srv/spotter/cli.py +++ b/basic/srv/spotter/cli.py @@ -41,6 +41,9 @@ parser_disable_autostart = subparsers.add_parser('disable-autostart', help='Disa parser_disable_autostart.set_defaults(action='disable-autostart') parser_disable_autostart.add_argument('app', help='Application name') +parser_rebuild_issue = subparsers.add_parser('rebuild-issue', help='Rebuilds /etc/issue using current settings - used on VM startup') +parser_rebuild_issue.set_defaults(action='rebuild-issue') + parser_register_proxy = subparsers.add_parser('register-proxy', help='Rebuilds nginx proxy target for an application container') parser_register_proxy.set_defaults(action='register-proxy') parser_register_proxy.add_argument('app', help='Application name') @@ -86,6 +89,8 @@ elif args.action == 'enable-autostart': mgr.enable_autostart(args.app) elif args.action == 'disable-autostart': mgr.disable_autostart(args.app) +elif args.action == 'rebuild-issue': + mgr.rebuild_issue() elif args.action == 'register-proxy': mgr.register_proxy(args.app) elif args.action == 'unregister-proxy':