Mercurial > hg > aboriginal
view sources/toys/make-hdb.sh @ 1630:dd94f87b89ae
It's been long enough since "truncate" was introduced we can use that instead of "dd" to make sparse files.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 28 Sep 2013 13:24:34 -0500 |
parents | 5e76b1ac1e6c |
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 }