Changeset 312


Ignore:
Timestamp:
Mar 13, 2007 5:19:19 PM (6 years ago)
Author:
jrollins
Message:

debirf: removed all "stage" stuff. checked for /proc in etc/fstab.

Location:
trunk/debirf
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/debirf/make-debirf

    r311 r312  
    4444    mkdir -p "$DEBIRF_ROOT" 
    4545    /usr/sbin/debootstrap --exclude=aptitude --include=initramfs-tools "$DEBIRF_DISTRO" "$DEBIRF_ROOT" "$DEBIRF_MIRROR" 
    46      
    47     > .stage/0 
    4846} 
    4947 
     
    5452    done 
    5553    run-parts --verbose "$DEBIRF_PLUGINS" 
    56      
    57     > .stage/1 
    5854} 
    5955 
     
    6561    msg "creating debirf initrd..." 
    6662    ( cd "$DEBIRF_ROOT" && find * | cpio -H newc --create  | gzip ) > "${DEBIRF_LABEL}_${DEBIRF_DISTRO}_${DEBIRF_".cgz 
    67     > .stage/4 
    6863} 
    6964 
     
    9085    cp extra/boot/"$INITRD" debirf.cgz 
    9186    (cd "$DEBIRF_ROOT" && find * | cpio -H newc --create  | gzip ) >> debirf.cgz 
    92     > .stage/4 
    9387} 
    9488 
     
    9690##### MAIN ##### 
    9791 
    98 # create checkpoint directory.  stages: 
    99 # 0: debootstrap creation 
    100 # 1: plugins 
    101 # 2: install kernel and extract kernel/initrd 
    102 # 3: prune 
    103 # 4: initrd method 
    104 mkdir -p .stage 
    105  
    10692##### create debootstrap root 
    107 if [ -f .stage/0 ] ; then 
    108     msg "it looks like a root already exists at $DEBIRF_ROOT." 
     93if [ -d "$DEBIRF_ROOT" ] ; then 
     94    echo "directory $DEBIRF_ROOT already exists." 
    10995    read -p "write over? [y|N]: " -n 1 OK ; [ -z $OK ] || echo 
    11096    if [ "${OK/y/Y}" = 'Y' ] ; then 
     
    151137> "$DEBIRF_ROOT/etc/mtab" 
    152138# add proc to fstab 
    153 echo proc /proc proc defaults 0 0 >> "$DEBIRF_ROOT/etc/fstab" 
    154      
    155 > .stage/3 
     139if ! grep '/proc' root/etc/fstab | grep -q -v "^[:space:]*#" ; then 
     140    echo proc /proc proc defaults 0 0 >> "$DEBIRF_ROOT/etc/fstab" 
     141fi 
    156142 
    157143create_initrd_${DEBIRF_METHOD} 
  • trunk/debirf/plugins/install-kernel

    r310 r312  
    3333    [ -f "$KERNEL" ] && mv "$KERNEL" extras/boot/$(basename "$KERNEL") 
    3434    [ -f "$INITRD" ] && mv "$INITRD" extras/boot/$(basename "$INITRD") 
    35      
    36     > .stage/2 
    3735} 
    38  
    3936 
    4037##### install kernel 
Note: See TracChangeset for help on using the changeset viewer.