On Mon, 24 Feb 2003, Derek Vadala wrote: > > 1 numdisks=0 > 2 while read num dev > 3 do > 4 if [ "$dev" == "sd" ];then > 5 ((numdisks++)) > 6 fi > 7 done < /proc/devices > > Working with 7.3 and having some problems with the shell that interprets > the %pre section. The above code works under bash without issue. But > a couple of parts balk during install. > > Line 4's == seems to break 7.3's installation shell. If i change it to as > ingle = sign then it works. However, the increment is broken too. I can > see 3 errors (the correct number for the target system) if I switch to the > anaconda info screen. > > I've tried several variations of line 5 to no avail. Suggestions > appreciated. I think I'm just missing basic info on which shell runs > during the installation process, that way I could look up the correct > syntaxes. Problem is the 7.3 kickstart docs don't mention it at all. And > the example code for the 8.0 kickstart explicitly uses some of the > conventions I'm trying here. Install the busybox rpm so you can try out things to find what works. Here's a transcript from my efforts to answer one of your questions: root@Lyrebird root]# chroot /tftpboot/ Lyrebird:~# busybox sh BusyBox v0.61.pre (2002.12.30-09:30+0000) Built-in shell (ash) Enter 'help' for a list of built-in commands. # NUMDISKS=0 # ((++NUMDISKS)) ++NUMDISKS: No such file or directory # $((++NUMDISKS)) syntax error: "++NUMDISKS" # $((NUMDISKS++)) syntax error: "NUMDISKS++" # NUMDISKS=$((NUMDISKS++)) syntax error: "NUMDISKS++" # NUMDISKS=$((NUMDISKS+1)) syntax error: "NUMDISKS+1" # NUMDISKS=$(($NUMDISKS+1)) # echo $NUMDISKS 1 # -- Please, reply only to the list.