view sources/toys/make-hdb.sh @ 1458:60f1087591ac

Add ability to specify a package to rebuild to build.sh with REBUILD= (and then dependencies take it from there to the system image).
author Rob Landley <rob@landley.net>
date Thu, 20 Oct 2011 02:02:10 -0500
parents 214b23b707b0
children 5e76b1ac1e6c
line wrap: on
line source

make_hdb()
{
  # Some distros don't put /sbin:/usr/sbin in the $PATH for non-root users.
  if [ -z "$(which  mke2fs)" ] || [ -z "$(which tune2fs)" ]
  then
    export PATH=/sbin:/usr/bin:$PATH
  fi

  dd if=/dev/zero of="$HDB" bs=1024 seek=$[$HDBMEGS*1024-1] count=1 &&
  mke2fs -q -b 1024 -F "$HDB" -i 4096 &&
  tune2fs -j -c 0 -i 0 "$HDB"

  [ $? -ne 0 ] && exit 1
}