1From 44226393812399c61de9ca9281efa002ad4f4c01 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 1 Jun 2017 15:15:15 +0800
4Subject: [PATCH 3/4] comment out sections shutdown and environment in
5 generated kickstart file
6
7Both of them is disabled by default.
8
9Upstream-Status: Inappropriate[oe specific]
10
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12
13fixup! add comments of shutdown for user
14---
15 pykickstart/commands/reboot.py | 3 +++
16 pykickstart/parser.py          | 2 +-
17 2 files changed, 4 insertions(+), 1 deletion(-)
18
19diff --git a/pykickstart/commands/reboot.py b/pykickstart/commands/reboot.py
20index 75a6d916..edfe83ff 100644
21--- a/pykickstart/commands/reboot.py
22+++ b/pykickstart/commands/reboot.py
23@@ -43,6 +43,9 @@ class FC3_Reboot(KickstartCommand):
24         elif self.action == KS_SHUTDOWN:
25             retval += "# Shutdown after installation\nshutdown"
26             retval += self._getArgsAsStr() + "\n"
27+        else:
28+            retval += "# Shutdown after installation\n#shutdown"
29+            retval += self._getArgsAsStr() + "\n"
30
31         return retval
32
33diff --git a/pykickstart/parser.py b/pykickstart/parser.py
34index bc59131b..b2d09d45 100644
35--- a/pykickstart/parser.py
36+++ b/pykickstart/parser.py
37@@ -428,7 +428,7 @@ class Packages(KickstartObject):
38
39         if not self.default:
40             if self.environment:
41-                pkgs += "@^%s\n" % self.environment
42+                pkgs += "#@^%s\n" % self.environment
43
44         grps = self.groupList
45         grps.sort()
46--
472.7.4
48
49