--- /tmp/postfix.orig 2013-03-01 19:45:02.738430373 -0800 +++ /etc/init.d/postfix 2013-03-01 19:57:14.854448557 -0800 @@ -82,12 +82,12 @@ $queue_dir/*) :;; # skip stuff already in chroot *) if test -d "$ca_path"; then - dest_dir="$queue_dir/${ca_path#/}" new=0 + dest_dir="$queue_dir/${ca_path%/}" new=0 if test -d "$dest_dir" # write to a new directory ... then dest_dir="$dest_dir.NEW" && new=1 - else mkdir --parent ${dest_dir%/*} fi + mkdir --parent ${dest_dir%/*} # handle files in subdirectories find "$ca_path" -print0 | cpio -0pdL "$dest_dir" if [ "$new" = 1 ]; then