From ec9fb42e19ed245baf9915f7da9209253ffbec98 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 24 Jul 2014 23:26:00 +0200 Subject: Keep split usr if original system has it, add extra logic if no split usr --- helper/fileutil.inc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'helper') diff --git a/helper/fileutil.inc b/helper/fileutil.inc index 525e46a7..10b4bbc7 100644 --- a/helper/fileutil.inc +++ b/helper/fileutil.inc @@ -23,7 +23,9 @@ tarcopy () { [ -z "$TO" ] && perror "tarcopy called with empty destination." [ ! -d "$TO" ] && { mkdir -p "$TO" || perror "could not create destination "$TO" for tar-copy."; } # TODO count files copied? would remove the need to do it everywhere :) - tar $IGNORE_ERROR -cpP $FROM | tar -xp -C "$TO" 2> /dev/null + tar $IGNORE_ERROR -cpP $FROM | tar -xp -C "$TO" \ + --transform 's,^/lib/udev/rules.d,/usr/lib/udev/rules.d,' \ + 2> /dev/null local PS=(${PIPESTATUS[*]}) [ "x$IGNORE_ERROR" == "x" -a "x${PS[0]}" != "x0" ] && perror "packing-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[0]})" [ "x${PS[1]}" != "x0" ] && perror "unpacking-part of tar-copy from '$SHORT' to '$TO' failed. (${PS[1]})" -- cgit v1.2.3-55-g7522