diff options
author | Bob Igo <bob@stormlogic.com> | 2009-06-06 16:48:58 (GMT) |
---|---|---|
committer | Bob Igo <bob@stormlogic.com> | 2009-06-06 16:48:58 (GMT) |
commit | 4d49c500658b2e9c06742f0930dd203448ecabb3 (patch) | |
tree | a055d83a69415a79b9a8df37b3db4bba7398a3fb /abs/core-testing/LinHES-config/install_functions.sh | |
parent | 870b21903c0898f2d71b4686b36ccc744a257b2c (diff) | |
download | linhes_pkgbuild-4d49c500658b2e9c06742f0930dd203448ecabb3.zip linhes_pkgbuild-4d49c500658b2e9c06742f0930dd203448ecabb3.tar.gz linhes_pkgbuild-4d49c500658b2e9c06742f0930dd203448ecabb3.tar.bz2 |
General bash comparison syntax cleanup.
Diffstat (limited to 'abs/core-testing/LinHES-config/install_functions.sh')
-rwxr-xr-x | abs/core-testing/LinHES-config/install_functions.sh | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/abs/core-testing/LinHES-config/install_functions.sh b/abs/core-testing/LinHES-config/install_functions.sh index ce9a057..9f38384 100755 --- a/abs/core-testing/LinHES-config/install_functions.sh +++ b/abs/core-testing/LinHES-config/install_functions.sh @@ -38,7 +38,7 @@ update_db_settings Theme "$pick" function parse_cmdline_2_db(){ echo $CMDLINE | grep -q displayres - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*displayres=} update_db_settings HostXres $TEMPVAR @@ -49,7 +49,7 @@ function parse_cmdline_2_db(){ function bootsplash_setup (){ echo $CMDLINE | grep -q splash=silent - if [ $? = 0 ] + if [ $? -eq 0 ] then update_db_settings Hostbootsplash 1 else @@ -72,7 +72,7 @@ function setupremote { update_db_settings HostRemoteType "$Remotetype" #special case for special remote printhl "Starting with support for $Remotetype" - if [ x$Remotetype = "xdvico" ] + if [ "$Remotetype" == "dvico" ] then /usr/sbin/lircd -d /dev/usb/hiddev0 else @@ -90,7 +90,7 @@ printhl " Scanning for Hauppauge receiver" for hpgid in `lspci -nm -d4444: |cut -d" " -f6- |tr -d '"'|tr " " :` do line=`grep $hpgid $TEMPLATES/remotes/i2c.id` - if [ $? = 0 ] + if [ $? -eq 0 ] then modprobe lirc_i2c FoundReceiverType=`echo "$line"|cut -d"|" -f2` @@ -131,7 +131,7 @@ while read line do USBID=`echo "$line"|cut -d"|" -f1` lsusb -d "$USBID" > /dev/null 2>/dev/null - if [ $? = 0 ] + if [ $? -eq 0 ] then Remotetype=`echo "$line"|cut -d"|" -f2` printhl "Found $Remotetype" @@ -140,7 +140,7 @@ do break fi done <$BASE/$TEMPLATES/remotes/receiver_usb.id -if [ $found_remote = 1 ] +if [ $found_remote -eq 1 ] then scan_for_hpg_receiver fi @@ -154,7 +154,7 @@ fi function rest_of_network () { #netmask echo $CMDLINE | grep -q netmask - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*netmask=} NETMASK=${TEMPVAR%% *} @@ -168,7 +168,7 @@ function rest_of_network () { fi #gateway echo $CMDLINE | grep -q gateway - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*gateway=} GATEWAY=${TEMPVAR%% *} @@ -180,7 +180,7 @@ function rest_of_network () { #dns echo $CMDLINE | grep -q dns - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*dns=} DNS=${TEMPVAR%% *} @@ -193,7 +193,7 @@ function rest_of_network () { function init_network { echo $CMDLINE |grep -q netdev - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*netdev=} MYTHDEFAULT=${TEMPVAR%% *} @@ -204,7 +204,7 @@ function init_network { echo $CMDLINE | grep -q ip - if [ $? = 0 ] + if [ $? -eq 0 ] then update_db_settings HostDefaulteth0 0 update_db_settings HostDefault${MYTHDEFAULT} 1 @@ -215,7 +215,7 @@ function init_network { TEMPVAR=${CMDLINE#*ip=} IP=${TEMPVAR%% *} - if [ x$IP = xdhcp ] + if [ "$IP" == "dhcp" ] then /sbin/dhcpcd $MYTHDEFAULT update_db_settings HostUseDHCP${MYTHDEFAULT} 0 @@ -230,7 +230,7 @@ function init_network { function init_remote { echo $CMDLINE | grep -q remoteport - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*remoteport=} REMOTEPORT=${TEMPVAR%% *} @@ -248,7 +248,7 @@ function init_remote { fi echo $CMDLINE | grep -q remote - if [ $? = 0 ] + if [ $? -eq 0 ] then TEMPVAR=${CMDLINE#*remote=} Remotetype=${TEMPVAR%% *} @@ -267,7 +267,7 @@ ROOT=$1 DATA=$2 SWAP=$3 -if [ ! x$SWAP = xNO ] +if [ ! "$SWAP" == "NO" ] then SWAPLINE=",$SWAP,S" MKSWAPCMD="mkswap /dev/${disk}2" @@ -276,7 +276,7 @@ if [ ! x$SWAP = xNO ] MKSWAPCMD="" fi -if [ x$DATA = xALL ] +if [ "$DATA" == "ALL" ] then DATALINE=",,," EXTRALINE="" @@ -343,7 +343,7 @@ unmount_it () { copy_it () { - if [ x$1 = xALL ] + if [ "$1" == "ALL" ] then echo "Transferring system" unsquashfs -f -d /$mountpoint /.livesys/medium/system.sqf @@ -431,7 +431,7 @@ function find_uuid() { get_grub_map() { - rm /tmp/dev.map + [ -e /tmp/dev.map ] && rm /tmp/dev.map /sbin/grub --no-floppy --device-map /tmp/dev.map <<EOF quit EOF @@ -489,7 +489,7 @@ dogrub() { #/usr/sbin/xfs_freeze -f /$mountpoint > /dev/null 2>&1 echo "freezing xfs fs" /usr/sbin/xfs_freeze -f /$mountpoint - if [ $? = 0 ] + if [ $? -eq 0 ] then sleep 40 echo "unfreezing xfs" @@ -559,7 +559,7 @@ case $1 in create_fstab fi #was 5 - if [ x$3 = xUPGRADE ] + if [ "$3" == "UPGRADE" ] then if [ ! -f /tmp/etc/KnoppMyth-version ] then @@ -586,11 +586,11 @@ case $1 in SWAPUUID=$FOUNDUUID FOUNDUUID="" - if [ x$4 = x ] + if [ "$4" == "" ] then #upgrade find_uuid ${2}3 - elif [ x$5 = xFULL_INSTALL ] + elif [ "$5" == "FULL_INSTALL" ] then #install find_uuid ${2}3 @@ -613,7 +613,7 @@ case $1 in if [ -f /tmp/etc/fstab ] then grep -q /dev/vg /tmp/etc/fstab - if [ $? = 0 ] + if [ $? -eq 0 ] then grep /dev/vg /tmp/etc/fstab >> /$mountpoint/etc/fstab grep /dev/vg /tmp/etc/fstab | awk -v mount=$mountpoint ' { print "/" mount $2 }' |xargs mkdir |