Bug 684103 - When kickstart is rendered, an runtime execution error occurs when running insmod /lib/ext4.o
Summary: When kickstart is rendered, an runtime execution error occurs when running in...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Spacewalk
Classification: Community
Component: Server
Version: 1.4
Hardware: All
OS: All
medium
high
Target Milestone: ---
Assignee: Michael Mráka
QA Contact: Red Hat Satellite QA List
URL:
Whiteboard:
Depends On:
Blocks: 462714 space14
TreeView+ depends on / blocked
 
Reported: 2011-03-11 05:47 UTC by Marcelo Moreira de Mello
Modified: 2012-03-06 09:14 UTC (History)
1 user (show)

Fixed In Version:
Clone Of: 684102
Environment:
Last Closed: 2011-03-11 05:53:56 UTC
Embargoed:


Attachments (Terms of Use)

Description Marcelo Moreira de Mello 2011-03-11 05:47:38 UTC
+++ This bug was initially created as a clone of Bug #684102 +++

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
Spacewalk 1.4 (Nightly)

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

Comment 1 Marcelo Moreira de Mello 2011-03-11 05:53:56 UTC
Not a bug!

Closing!


Note You need to log in before you can comment on or make changes to this bug.