Ignore:
Timestamp:
Dec 10, 2007 5:58:21 PM (5 years ago)
Author:
jrollins
Message:

debirf: see changelog

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/debirf/fs/usr/bin/make-debirf

    r772 r775  
    2929usage() { 
    3030    cat <<EOF 
    31 Usage: $CMD [options] profile kernel 
     31Usage: $CMD [options] profile [kernel] 
    3232Create a debirf system.  'profile' is a path to a debirf profile 
    33 directory, and 'kernel' is a kernel-img .deb, or a kernel package name. 
     33directory.  If a kernel is specified, it will override the kernel 
     34specified in the profile debirf.conf. 
    3435 
    3536options: 
     
    4142  -s|--skip          skip debootstrap step if old root exists 
    4243  -i|--initrd-only   do not create root, just create initramfs 
     44EOF 
     45} 
     46 
     47usage_profile() { 
     48    cat <<EOF 
     49It looks like your profile is not correctly formed.  You should begin 
     50by copying and modifying one of the example debirf profiles. 
     51On Debian, you should run: 
     52cp -r /usr/share/doc/debirf/example-profiles/<profile-name> .  
    4353EOF 
    4454} 
     
    237247            fi 
    238248            DEBIRF_PROFILE="$1" 
    239             DEBIRF_KERNEL_PACKAGE="$2" 
     249            if [ "$2" ] ; then 
     250                DEBIRF_KERNEL_PACKAGE="$2" 
     251            fi 
    240252            break 
    241253            ;; 
     
    252264    DEBIRF_PLUGINS="$DEBIRF_PROFILE/plugins" 
    253265else 
    254     failure "$DEBIRF_PROFILE not found.  Create a new profile with the '-p' option." 
     266    echo "$DEBIRF_PROFILE not found." 
     267    usage_profile 
     268    exit 1 
    255269fi 
    256270 
     
    259273    source "$DEBIRF_CONF" 
    260274else 
    261     failure "$DEBIRF_CONF not found." 
     275    echo "$DEBIRF_CONF not found." 
     276    usage_profile 
     277    exit 1 
    262278fi 
    263279 
    264280# check plugins directory 
    265281if [ ! -d "$DEBIRF_PLUGINS" ] ; then 
    266     failure "$DEBIRF_PLUGINS does not exist." 
     282    echo "$DEBIRF_PLUGINS does not exist." 
     283    usage_profile 
     284    exit 1 
    267285fi 
    268286if [ $(ls "$DEBIRF_PLUGINS" -1 | wc -l) = 0 ] ; then 
    269     failure "$DEBIRF_PLUGINS is empty." 
     287    echo "$DEBIRF_PLUGINS is empty." 
     288    usage_profile 
     289    exit 1 
    270290fi 
    271291 
     
    307327        failure "Specified kernel package '$DEBIRF_KERNEL_PACKAGE' not found." 
    308328    fi 
     329else 
     330    echo "Using deb kernel package '$DEBIRF_KERNEL_PACKAGE'." 
    309331fi 
    310332 
Note: See TracChangeset for help on using the changeset viewer.