Bug 684102
| Summary: | When kickstart is rendered, an runtime execution error occurs when running insmod /lib/ext4.o | |||
|---|---|---|---|---|
| Product: | Red Hat Satellite 5 | Reporter: | Marcelo Moreira de Mello <mmello> | |
| Component: | Provisioning | Assignee: | Tomas Lestach <tlestach> | |
| Status: | CLOSED DUPLICATE | QA Contact: | Red Hat Satellite QA List <satqe-list> | |
| Severity: | medium | Docs Contact: | ||
| Priority: | medium | |||
| Version: | 540 | CC: | mmello, xdmoon | |
| Target Milestone: | --- | |||
| Target Release: | --- | |||
| Hardware: | All | |||
| OS: | All | |||
| Whiteboard: | ||||
| Fixed In Version: | Doc Type: | Bug Fix | ||
| Doc Text: | Story Points: | --- | ||
| Clone Of: | ||||
| : | 684103 (view as bug list) | Environment: | ||
| Last Closed: | 2011-03-11 08:40:15 UTC | Type: | --- | |
| Regression: | --- | Mount Type: | --- | |
| Documentation: | --- | CRM: | ||
| Verified Versions: | Category: | --- | ||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | ||
| Cloudforms Team: | --- | Target Upstream Version: | ||
| Embargoed: | ||||
| Bug Depends On: | ||||
| Bug Blocks: | 646488 | |||
Hello,
Investigating the issue, we found the RCA:
[root@sat-server]# ls -la /var/lib/rhn/kickstarts/snippets/keep_system_id
-rw-r--r-- 1 tomcat tomcat 1799 Feb 17 09:05 /var/lib/rhn/kickstarts/snippets/keep_system_id
[root@sat-server]# rpm -qf /var/lib/rhn/kickstarts/snippets/keep_system_id
spacewalk-java-1.2.39-35.1.el5sat
[root@sat-server]# grep ext4 -B 2 -A 2 /var/lib/rhn/kickstarts/snippets/keep_system_id
insmod /lib/ext3.o
if [ -f /lib/ext4.o ];
insmod /lib/ext4.o
fi
[root@sat-server]# rhn-schema-version
5.4.0.9-1.el5sat
Kind Regards,
Marcelo Moreira de Mello
Hello,
This bug already were fixed in Satellite54 code
mmello $> git show 7549871d887d1b821f9efea0d78de03c68ee2d9d
commit 7549871d887d1b821f9efea0d78de03c68ee2d9d
Author: Justin Sherrill <jsherril>
Date: Tue Oct 26 08:31:36 2010 -0400
fixing broken if statement in snippet
(cherry picked from commit bb3183abcf9d69bba1092d8104c456b2e3e996f7)
diff --git a/java/conf/cobbler/snippets/keep_system_id b/java/conf/cobbler/snippets/keep_system_id
index 0f31f37..fdf0213 100644
--- a/java/conf/cobbler/snippets/keep_system_id
+++ b/java/conf/cobbler/snippets/keep_system_id
@@ -7,7 +7,7 @@ rhn_keys_found=no
insmod /lib/jbd.o
insmod /lib/ext3.o
-if [ -f /lib/ext4.o ];
+if [ -f /lib/ext4.o ]; then
insmod /lib/ext4.o
fi
*** This bug has been marked as a duplicate of bug 664724 *** |
Description of problem: When kickstart is rendered, an runtime execution error is found when running insmod /lib/ext4.o. Kickstart script is missing the syntax 'then' Kickstart is rendered as below: %pre echo "Saving RHN keys..." > /dev/ttyS0 SYSTEM_ID=/etc/sysconfig/rhn/systemid rhn_keys_found=no insmod /lib/jbd.o insmod /lib/ext3.o if [ -f /lib/ext4.o ]; insmod /lib/ext4.o fi Version-Release number of selected component (if applicable): Red Hat Satellite 5.4 How reproducible: 100% Steps to Reproduce: 1. Create a kickstart Actual results: Kickstart is rendered with a error in syntax for Bash script: insmod /lib/jbd.o insmod /lib/ext3.o if [ -f /lib/ext4.o ]; insmod /lib/ext4.o fi Expected results: Kickstart executes with no errors: if [ -f /lib/ext4.o ]; then insmod /lib/ext4.o fi # if [ -f /lib/ext4.o ];then insmod /lib/ext4.o; fi Additional info: === Not Working [root@server]# if [ -f /lib/ext4.o ]; insmod /lib/ext4.o; fi bash: syntax error near unexpected token `fi' [root@server]# echo $? 2 === Working [root@server]# if [ -f /lib/ext4.o ];then insmod /lib/ext4.o; fi [root@server]# echo $? 0