RE: %pre script with rhel 3.0

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

 



I think you are on the right path Richard.  I just modify my script to the following to see if any value is being assign to the variables

%pre
#!/bin/sh

#
# Gets list of drives with size of each drive
#
set $(list-harddrives)
let numd=$#/2
echo $numd > /tmp/output1
# Setup to accommodate up to 2 drives
d1=$1
d2=$3

echo $numd > /tmp/output2
echo $numd > /tmp/output3

And I notices few odd behavior. 1st, the name of all the output file has a '?' append to it (i.e /tmp/output1?)  2nd, there is no value assign to numd, the output was blank!  Any idea?  When I ran the command manually during anaconda install (from console 2), it works

Dwc

-----Original Message-----
From: Richard Black [mailto:richard.black@xxxxxx] 
Sent: Wednesday, April 07, 2004 11:14 AM
To: Chan, Dominic
Cc: anaconda-devel-list@xxxxxxxxxx
Subject: Re: %pre script with rhel 3.0

Other than the typo, I don't see anything:

# Disk partitioning information
%include /tmp/partinf

You should at least get one of the if statements to execute which would populate /tmp/partinfo with something.  Maybe you have some errors in your if statement?

The if statement might break if $numd is blank.  Try enclosing in "" to fix.

If still no luck after fixing the type and using double quotes, then try simplifying the if statement until it works.

Sincerely,

Richard Black



Chan, Dominic wrote:

>Can anyone tell me if the %pre script precedure or /tmp partition during
>installation phrase change on rhel 3.0?  I use the following ks.cfg with
>my redhat 9.0 build.  It partitions my disk base on the number of drives
>it detects.  However, when I try to use the same ks.cfg with my rhel
>as3.0, it doesn't work!  The /tmp/partinfo never make it to my /tmp or
>/mnt/sysimage/tmp partition.  Any feedback will be strongly appreciated
>
>Dwc
>
># Clear all partitions from the disk
>clearpart --all --initlabel
>
># Disk partitioning information
>%include /tmp/partinf
>
>%pre
>#!/bin/sh
>
>#
># Gets list of drives with size of each drive
>#
>set $(list-harddrives)
>let numd=$#/2
>
># Setup to accommodate up to 2 drives
>d1=$1
>d2=$3
>
>if [ $numd == "2" ] ; then
>echo "
>part /boot --fstype ext3 --size 100 --ondisk=$d1 --asprimary
>part / --fstype ext3 --size 500 --ondisk=$d1
>part /usr --fstype ext3 --size=2000 --ondisk=$d1
>part /usr/src --fstype ext3 --size=500 --ondisk=$d1
>part /tmp --fstype ext3 --size=1024 --ondisk=$d1
>part /home --fstype ext3 --size=500 --grow --ondisk=$d1
>part /chroot --fstype ext3 --size=500 --ondisk=$d1
>part swap --size=1024 --ondisk=$d2 --asprimary
>part /var --fstype ext3 --size 100 --grow --ondisk=$d2
>" > /tmp/partinfo
>
>else
>
>echo "
>part /boot --fstype ext3 --size=100 --ondisk=$d1
>part / --fstype ext3 --size=300 --ondisk=$d1
>part /usr --fstype ext3 --size=1000 --ondisk=$d1
>part /usr/src --fstype ext3 --size=500 --ondisk=$d1
>part /home --fstype ext3 --size=1000 --ondisk=$d1
>part /tmp --fstype ext3 --size=256 --ondisk=$d1
>part /var --fstype ext3 --size=500 --grow --ondisk=$d1
># part /spool --fstype ext3 --size=500 --ondisk=$d1
>part /chroot --fstype ext3 --size=500 --ondisk=$d1
>part swap --size=256 --grow --maxsize=512 --ondisk=$d1
>" > /tmp/partinfo
>
>fi
>
>Both the individual sending this e-mail and The Lubrizol Corporation intend that this electronic message be used exclusively by the individual or entity to which it is intended to be addressed.  This message may contain information that is privileged, confidential and thereby exempt and protected from unauthorized disclosure under applicable law.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is not authorized and is strictly prohibited.  If you have received this communication and are not the intended recipient, please notify the sender immediately and permanently delete the original message from your e-mail system.     
>
>http://www.lubrizol.com/disclaimer/cliquez_ici_pour_traduction_en_francais.htm 
>http://www.lubrizol.com/disclaimer/Für_die_deutsche_Übersetzung_bitte_hier_klicken.htm  
>http://www.lubrizol.com/disclaimer/Clicar_aqui_para_versão_em_Português.htm
>http://www.lubrizol.com/disclaimer/Dé_un_clic_aquí_para_su_traducción_al_español.htm 
>http://www.lubrizol.com/disclaimer/Chinese.htm 
>http://www.lubrizol.com/disclaimer/Japanese.htm     
>
>
>_______________________________________________
>Anaconda-devel-list mailing list
>Anaconda-devel-list@xxxxxxxxxx
>https://www.redhat.com/mailman/listinfo/anaconda-devel-list
>  
>

Both the individual sending this e-mail and The Lubrizol Corporation intend that this electronic message be used exclusively by the individual or entity to which it is intended to be addressed.  This message may contain information that is privileged, confidential and thereby exempt and protected from unauthorized disclosure under applicable law.  If the reader of this message is not the intended recipient, or an employee or agent responsible for delivering the message to the intended recipient, be aware that any disclosure, dissemination, distribution or copying of this communication, or the use of its contents, is not authorized and is strictly prohibited.  If you have received this communication and are not the intended recipient, please notify the sender immediately and permanently delete the original message from your e-mail system.     

http://www.lubrizol.com/disclaimer/cliquez_ici_pour_traduction_en_francais.htm 
http://www.lubrizol.com/disclaimer/Für_die_deutsche_Übersetzung_bitte_hier_klicken.htm  
http://www.lubrizol.com/disclaimer/Clicar_aqui_para_versão_em_Português.htm
http://www.lubrizol.com/disclaimer/Dé_un_clic_aquí_para_su_traducción_al_español.htm 
http://www.lubrizol.com/disclaimer/Chinese.htm 
http://www.lubrizol.com/disclaimer/Japanese.htm     



[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