Browse files

Enable --force-unsafe-io for dpkg

While this might help on resource constrained systems, no performance
impact has been measured during an unscientific test on a well-geared
machine.
  • Loading branch information...
1 parent 47b815e commit 9269536ba7bb7def8664972d153b71d193450595 Christian Hofstaedtler committed Jun 15, 2011
Showing with 6 additions and 0 deletions.
  1. +6 −0 grml-live
View
6 grml-live
@@ -540,12 +540,18 @@ else
mount --bind "${MIRROR_DIRECTORY}" "${CHROOT_OUTPUT}/${MIRROR_DIRECTORY}"
fi
+ # tell dpkg to use "unsafe io" during the build
+ [ -d "$CHROOT_OUTPUT/etc/dpkg/dpkg.cfg.d" ] || mkdir -p "$CHROOT_OUTPUT/etc/dpkg/dpkg.cfg.d"
+ echo force-unsafe-io > "$CHROOT_OUTPUT/etc/dpkg/dpkg.cfg.d/unsafe-io"
+
log "Executed FAI command line:"
log "BUILD_ONLY=$BUILD_ONLY BOOTSTRAP_ONLY=$BOOTSTRAP_ONLY fai $VERBOSE -C $GRML_FAI_CONFIG -c$CLASSES -u $HOSTNAME $FAI_ACTION $CHROOT_OUTPUT $FAI_ARGS"
BUILD_ONLY="$BUILD_ONLY" BOOTSTRAP_ONLY="$BOOTSTRAP_ONLY" fai $VERBOSE -C "$GRML_FAI_CONFIG" -c"$CLASSES" -u \
"$HOSTNAME" $FAI_ACTION "$CHROOT_OUTPUT" $FAI_ARGS | tee -a $LOGFILE
RC="$PIPESTATUS" # notice: bash-only
+ rm -f "$CHROOT_OUTPUT/etc/dpkg/dpkg.cfg.d/unsafe-io"
+
FORCE_ISO_REBUILD=true
if [ "$RC" != 0 ] ; then

0 comments on commit 9269536

Please sign in to comment.