Changeset 529

Show
Ignore:
Timestamp:
05/15/08 08:41:43 (2 months ago)
Author:
free
Message:

Pass pci=nobios to the kernel on Q1s

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • cdd-utils/trunk/debian/changelog

    r522 r529  
    1111  * Mount /proc/bus/usb to workaround broken udev midisport rule 
    1212  * Don't ask password to sudoers 
     13  * Pass pci=nobios to the kernel on Q1s 
    1314 
    1415 -- Free Ekanayaka <free@64studio.com>  Thu, 08 May 2008 21:55:32 +0200 
  • cdd-utils/trunk/lib/common.sh

    r509 r529  
    3434    sed -i -e "s|^${key}${sep}.*|${key}${sep}${val}|g" $cfg 
    3535} 
     36get_key () { 
     37    key="$1" 
     38    sep="$2" 
     39    cfg="$3" 
     40    if ! grep -q "^$key" "$cfg"; then 
     41        warning "key $key not found in $cfg" 
     42        return 
     43    fi 
     44    grep "^${key}${sep}" $cfg | sed -e "s|^${key}${sep}\(.*\)|\1|g" 
     45} 
    3646del_key () { 
    3747    key="$1" 
     
    3949    sed -i -e "\|^$key| d" $cfg 
    4050} 
     51is_ubuntu () { 
     52 
     53    if [ "$DISTRIB_ID" = "Ubuntu" ]; then 
     54        return 0 
     55    else 
     56        return 1 
     57    fi 
     58 
     59} 
  • cdd-utils/trunk/lib/suites.sh

    r522 r529  
    6060    cdd-config midisport 
    6161    cdd-config sudoers 
     62    cdd-config kopt pci=nobios 
    6263 
    6364    # Various updates and fixes 
  • cdd-utils/trunk/lib/system.sh

    r522 r529  
    55    if ! exists $cfg; then warning $cfg not found; return; fi 
    66 
    7     if [ "$DISTRIB_ID" = "Ubuntu" ]; then 
     7    if is_ubuntu; then 
    88        set_key "%admin" " " "ALL=(ALL) NOPASSWD: ALL" $cfg 
    99        exit 
     
    212212    fi 
    213213} 
     214 
     215# Boot options 
     216kopt () { 
     217    if nullstr $1; then warning "no option given"; return 1; fi 
     218    opt=$1 
     219    cfg=/boot/grub/menu.lst 
     220    if ! exists $cfg; then warning $cfg not found; return; fi 
     221    key="# kopt" 
     222    sep="=" 
     223    cur="$(get_key "$key" "$sep" "$cfg")" 
     224    if [[ "$cur" =~ "${opt}" ]]; then return; fi 
     225    val="$cur $opt" 
     226    set_key "$key" "$sep" "$val" "$cfg" 
     227}