Changeset 279 for 64studio/trunk/utils

Show
Ignore:
Timestamp:
10/01/07 09:22:08 (14 months ago)
Author:
free
Message:

* Use cdd-utils

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • 64studio/trunk/utils/64studio-config

    r235 r279  
    1111db_get passwd/username 
    1212USER=$RET 
    13 if [ -n "$USER" ]; then 
    14     if ! grep -q -e "^$USER" /etc/sudoers; then 
    15         echo "$USER     ALL=NOPASSWD: ALL" >> /etc/sudoers 
    16     fi 
    17     for group in disk camera scanner stb-admin adm; do 
    18         addgroup --system $group || true 
    19         adduser "$USER" $group 
    20     done 
    21 fi 
    22  
    23 # Configure bootsplash. We should have a working grub 
    24 # menu file now, if not it probably means that the user 
    25 # choose to skip the bootloader installation 
    26 GRUB_MENU=/boot/grub/menu.lst 
    27 if [ -e $GRUB_MENU ]; then 
    28     VGA_RES=791 
    29     KOPT=$(grep -e "^# kopt" /boot/grub/menu.lst | \ 
    30         sed -e 's/vga=[[:digit:]]\{3\}[[[:blank:]]\?//g'| \ 
    31         sed -e 's/silent=[[:digit:]]\{3\}[[[:blank:]]\?//g') 
    32     KOPT="$KOPT vga=$VGA_RES splash=silent" 
    33     sed -i -e "s|^# kopt=.*|$KOPT|g" $GRUB_MENU 
    34     update-grub 
    35 fi 
    36  
    37 # Disable services 
    38 SERVICES="samba rsync bittorrent nfs-common anacron cron" 
    39 for SERVICE in $SERVICES; do 
    40     update-rc.d -f $SERVICE remove 
    41 done 
    42  
    43 # Load snd-seq at boot 
    44 if [ -e /etc/modules ]; then 
    45     if ! grep -q snd-seq /etc/modules; then 
    46         echo snd-seq >>  /etc/modules 
    47     fi 
    48 fi 
    49  
    50 # If network is available, run apt-get update, otherwise 
    51 # comment the source list 
    52 APT_SOURCE=/etc/apt/sources.list.d/64studio.list 
    53 if ! [ -e /proc/net/route ]; then 
    54         mount /proc 
    55 fi 
    56 if route -n | grep -q ^0.0.0.0; then 
    57     apt-get update || sed -i -e 's/^deb /#deb /g' $APT_SOURCE 
    58  
    59     # Comment the cdrom source, we install from the internet 
    60     if [ -e /etc/apt/sources.list ]; then 
    61         sed -i -e 's/^\(deb cdrom:.*\)/#\1/g' /etc/apt/sources.list 
    62     fi 
    63 else 
    64     sed -i -e 's/^deb /#deb /g' $APT_SOURCE 
    65 fi 
     13cdd-config sudoers $USER 
     14cdd-config groups  $USER 
     15cdd-config bootsplash 791 
     16cdd-config services anacron bittorrent cron nfs-common rsync samba 
     17cdd-config modules snd-seq 
     18cdd-config apt 64studio 
    6619 
    6720# Make sure the .desktop is up-to-date