Changeset 529
- Timestamp:
- 05/15/08 08:41:43 (2 months ago)
- Files:
-
- cdd-utils/trunk/debian/changelog (modified) (1 diff)
- cdd-utils/trunk/lib/common.sh (modified) (2 diffs)
- cdd-utils/trunk/lib/suites.sh (modified) (1 diff)
- cdd-utils/trunk/lib/system.sh (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
cdd-utils/trunk/debian/changelog
r522 r529 11 11 * Mount /proc/bus/usb to workaround broken udev midisport rule 12 12 * Don't ask password to sudoers 13 * Pass pci=nobios to the kernel on Q1s 13 14 14 15 -- Free Ekanayaka <free@64studio.com> Thu, 08 May 2008 21:55:32 +0200 cdd-utils/trunk/lib/common.sh
r509 r529 34 34 sed -i -e "s|^${key}${sep}.*|${key}${sep}${val}|g" $cfg 35 35 } 36 get_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 } 36 46 del_key () { 37 47 key="$1" … … 39 49 sed -i -e "\|^$key| d" $cfg 40 50 } 51 is_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 60 60 cdd-config midisport 61 61 cdd-config sudoers 62 cdd-config kopt pci=nobios 62 63 63 64 # Various updates and fixes cdd-utils/trunk/lib/system.sh
r522 r529 5 5 if ! exists $cfg; then warning $cfg not found; return; fi 6 6 7 if [ "$DISTRIB_ID" = "Ubuntu" ]; then7 if is_ubuntu; then 8 8 set_key "%admin" " " "ALL=(ALL) NOPASSWD: ALL" $cfg 9 9 exit … … 212 212 fi 213 213 } 214 215 # Boot options 216 kopt () { 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 }
