view sources/toys/make-hdb.sh @ 1719:78050a31d1ee draft

Sigh. Checked in the wrong version of the patch (typo fix).
author Rob Landley <rob@landley.net>
date Tue, 06 Jan 2015 13:15:33 -0600
parents dd94f87b89ae
children
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/sbin:$PATH
  fi

  truncate -s ${HDBMEGS}m "$HDB" &&
  mke2fs -q -b 1024 -F "$HDB" -i 4096 &&
  tune2fs -j -c 0 -i 0 "$HDB"

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