[firstboot] Don't run firstboot if it's set in /etc/sysconfig/firstboot (#723526)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 progs/firstboot |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/progs/firstboot b/progs/firstboot
index ced29fc..e3c168d 100755
--- a/progs/firstboot
+++ b/progs/firstboot
@@ -63,6 +63,15 @@ if __name__ == '__main__':
 
     opts, args = parser.parse_args()
 
+    # XXX should we run?
+    if os.path.isfile('/etc/sysconfig/firstboot'):
+        with open('/etc/sysconfig/firstboot') as fobj:
+            for line in fobj:
+                if line.strip() == 'RUN_FIRSTBOOT=NO':
+                    os.system('systemctl stop firstboot-graphical.service > /dev/null 2>&1')
+                    os.system('systemctl stop firstboot-text.service > /dev/null 2>&1')
+                    sys.exit(0)
+
     if not opts.module_dir:
         opts.module_dir = MODULE_DIR
 
-- 
1.7.3.2

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list


[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux