From 35538d605f07a6c427a62d26bef8c163882404ae Mon Sep 17 00:00:00 2001 From: Eric Renfro Date: Sun, 4 Aug 2024 15:52:15 -0400 Subject: [PATCH] Fixed bugs in stage4 tar operations --- gen2stage4 | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/gen2stage4 b/gen2stage4 index 082deb6..5dd2adf 100755 --- a/gen2stage4 +++ b/gen2stage4 @@ -191,7 +191,6 @@ tarExcludesPortage=( tarIncludes=( "dev/console" "dev/null" - "var/db/pkg/*" ) tarExcludes=("${tarExcludes[@]/#/"$targetPath"}") @@ -263,7 +262,7 @@ if ! $optQuiet; then echo "example: \$ $(basename "$0") -s /my-backup --exclude=/etc/ssh/ssh_host*" echo echo "COMMAND LINE PREVIEW:" - echo 'tar' "${tarOptions[@]}" "${tarExcludes[@]/#/--exclude=}" -f "${stage4Filename}.${stage4Ext}" "${targetPath}" "${tarIncludes[@]}" + echo 'tar' "${tarOptions[@]}" "${tarIncludes[@]}" "${tarExcludes[@]/#/--exclude=}" -f "${stage4Filename}.${stage4Ext}" "${targetPath}" if $optSeperateKernel; then echo echo 'tar' "${tarOptions[@]}" -f "${stage4Filename}.ksrc.${stage4Ext}" "${targetPath}usr/src/linux-$(uname -r)" @@ -280,8 +279,7 @@ fi # start stage4 creation: if $optQuiet; then tar "${tarOptions[@]}" "${tarIncludes[@]}" "${tarExcludes[@]/#/--exclude=}" -f "${stage4Filename}.${stage4Ext}" "${targetPath}" - if [[ "$optSeperateKernel" ]] - then + if "$optSeperateKernel"; then tar "${tarOptions[@]}" -f "${stage4Filename}.ksrc.${stage4Ext}" "${targetPath}usr/src/linux-$(uname -r)" tar "${tarOptions[@]}" -f "${stage4Filename}.kmod.${stage4Ext}" "${targetPath}lib"*"/modules/$(uname -r)" fi