Changeset 190 for quickinst/quickinst


Ignore:
Timestamp:
23.10.2008 13:33:33 (21 months ago)
Author:
henning
Message:

quickinst: fstab generation by uuid

File:
1 edited

Legend:

Unmodified
Added
Removed
  • quickinst/quickinst

    r189 r190  
    2020    -c         Force chroot on Arch Linux. Local pacman cache will not be used. 
    2121    -f         Generate fstab. Don't rely on that. 
     22        -fu        Generate fstab with UUIDs. Don't rely on that, either. 
    2223        -i <file>  Include packages from <file> in the installation. <file> should 
    2324               contain one package name per line. 
     
    3536        case $1 in 
    3637                -c) chroot=true; shift;; 
    37                 -f) fstab=true; shift;; 
     38                -f) fstab=true; fstab_uuid=false; shift;; 
     39                -fu) fstab_uuid=true; fstab=false; shift;; 
    3840                -i) 
    3941                        [ ! -f $2 ] && 
     
    155157} 
    156158 
     159[ $fstab_uuid ] && { 
     160        grep $target /proc/mounts | while read line; do 
     161                device=$(echo $line | cut -d ' ' -f 1) 
     162                uuid=$(/lib/udev/vol_id --uuid $device) 
     163 
     164                [ "$(echo $line | sed -e "s:$target::" | cut -d ' ' -f 2)" == "" ] && 
     165                        repl='/' || repl='' 
     166 
     167                echo $line | sed -e "s:$target:$repl:" -e "s:$device:UUID=$uuid:" 
     168        done 
     169} 
     170 
    157171echo · cleaning up. 
    158172        [ -h $cache ] && rm $cache && mkdir $cache 
Note: See TracChangeset for help on using the changeset viewer.