-1

I am trying to customize the kickstarter script to extract the parameters from the user during the pre-installation process. The format of the command is:

raidtype HAtype partitionSize

i.e. raid1 hanode 2048 or radi1 hanode 4096 and so on

However, the script is not running during installtion. I have narrowed it down to the HANODE_SIZE parameter.

#--- Pre-installation script
%pre --interpreter /bin/sh

# Extract command line parameters
NORAID=`grep noraid /proc/cmdline`
RAID1=`grep raid1 /proc/cmdline`
RAID5=`grep raid5 /proc/cmdline`
HANODE=`grep hanode /proc/cmdline`
HANODE_SIZE=`sed 's/.*hanode *\([0-9]*\).*/\1/'`
if [ -z "${HANODE_SIZE}" ]; then
    HANODE_SIZE="2048"
fi

When I get rid of the HANODE_SIZE, the installation is successful (obviously without the ability to specify the partition size). However when I include the statement that contains the sed command the installation stalls during the executaion of the kickstarter script. Can someone tell me what I am doing wrong? Is there something wrong with my sed statement?

cel
  • 30,017
  • 18
  • 97
  • 117
SSF
  • 915
  • 5
  • 23
  • 47

1 Answers1

-1

I eventually noticed the issue. the sed command also required to use the command line file. The following eventually worked:

HANODE_SIZE=`sed 's/.*hanode *\([0-9]*\).*/\1/' /proc/cmdline`
SSF
  • 915
  • 5
  • 23
  • 47