From 8248834aa0e56499073b8883c1b909d699c5e69e Mon Sep 17 00:00:00 2001 From: Dave Reisner Date: Fri, 27 Aug 2010 22:44:00 -0400 Subject: fix mounting order when rolling back --- squashfu | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/squashfu b/squashfu index f6880d2..20b2951 100755 --- a/squashfu +++ b/squashfu @@ -276,7 +276,8 @@ action_rollback () { if [[ ${#bin_list[@]} -eq $1 ]]; then local rb_timestamp=0 # XXX: What the hell is the timestamp of the seed... ? else - mount_union_with_bins ${bin_list[@]:(-$num_to_mount)} + # voodoo magic: reverse bin_list and print off the top (#bin_list - $1) bins + mount_union_with_bins $(for (( i = ${#bin_list[@]} - $1 - 1; i >= 0; i-- )); do echo ${bin_list[i]}; done) local rb_timestamp=$(grep "^${bin_list[@]:(-$num_to_mount):1}:" "$BINVENTORY" | cut -d: -f2) fi -- cgit v1.2.3