From eea9a72676c1ed9cf7fc7e910938bb7231e5b5a3 Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Tue, 29 May 2012 09:29:01 +0200 Subject: [PATCH] bugfix: tell schroot which chroot to use Signed-off-by: Steven Armstrong --- other/examples/remote/schroot-uri | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/other/examples/remote/schroot-uri b/other/examples/remote/schroot-uri index a23277ec..9819c5a5 100755 --- a/other/examples/remote/schroot-uri +++ b/other/examples/remote/schroot-uri @@ -1,6 +1,6 @@ #!/bin/sh -e # -# 2011 Steven Armstrong (steven-cdist at armstrong.cc) +# 2012 Steven Armstrong (steven-cdist at armstrong.cc) # # This file is part of cdist. # @@ -49,7 +49,8 @@ my_name="${0##*/}" mode="$1"; shift log() { - echo "$@" | logger -t "cdist-$my_name-$mode" + # uncomment me for debugging + #echo "$@" | logger -t "cdist-$my_name-$mode" : } @@ -109,6 +110,9 @@ else copy_prefix="cp" copy_destination_prefix="" fi +log "exec_prefix: $exec_prefix" +log "copy_prefix: $copy_prefix" +log "copy_destination_prefix: $copy_destination_prefix" case "$mode" in exec) @@ -118,8 +122,9 @@ case "$mode" in ;; copy) # get directory for given chroot_name - schroot_directory="$($exec_prefix schroot $chroot_name --config | awk -F = '/directory=/ {print $2}')" + schroot_directory="$($exec_prefix schroot -c $schroot_name --config | awk -F = '/directory=/ {print $2}')" [ -n "$schroot_directory" ] || die "Failed to retreive schroot directory for schroot: $schroot_name" + log "schroot_directory: $schroot_directory" # prefix destination with chroot code="$copy_prefix $(echo "$@" | sed "s|$uri:|${copy_destination_prefix}${schroot_directory}|g")" ;;