mkstage4 output :
'[...] --exclude=/mnt/bind-home/usr/portage/*' '--totals -v --strip-components=2' -f /run/media/nykay/Backup-1/tar/test-home.tar.bz2 /mnt/bind-home/ tar: unrecognized option '--totals -v --strip-components=2' Try 'tar --help' or 'tar --usage' for more information.
'--totals -v --strip-components=2' line is interpreted just like unique option
I solved removing double quotes from mkstage4 script to the ${OPTIONS[@]} array
tar "${TAR_OPTIONS[@]}" "${INCLUDES[@]}" "${EXCLUDES[@]}" ${OPTIONS[@]} -f "$STAGE4_FILENAME" "${TARGET}"
and to the echo for the printed output
echo 'tar' "${TAR_OPTIONS[@]}" "${INCLUDES[@]}" "${EXCLUDES[@]}" ${OPTIONS[@]} -f "$STAGE4_FILENAME" "${TARGET}"
So TAR can recognized the single custom option now
edit :
or update "Shifts pointer to read custom tar options"
for custom_opts in $@ ; do OPTIONS+=("$custom_opts") ; done ((${#OPTIONS[@]} == 1)) && [ -z "${OPTIONS[0]}" ] && unset OPTIONS
Got this ok :
--exclude=/mnt/bind-home/usr/portage/* --totals -v --strip-components=2 -f /run/media/nykay/Backup-1/tar/test-home.tar.bz2 /mnt/bind-home/
Hi
Multiple custom options error
Adding more than 1 custom option , tar command doesn't recognized them : (i.e.: adding --totals -v --strip-components=2) to the mkstage commnd options
I got under single quote a unique option that tar not recognized:
Running mkstage4 :
mkstage4 -t /mnt/bind-home test-home --totals -v --strip-components=2
mkstage4 output :
'[...] --exclude=/mnt/bind-home/usr/portage/*' '--totals -v --strip-components=2' -f /run/media/nykay/Backup-1/tar/test-home.tar.bz2 /mnt/bind-home/ tar: unrecognized option '--totals -v --strip-components=2' Try 'tar --help' or 'tar --usage' for more information.
'--totals -v --strip-components=2'
line is interpreted just like unique optionI solved removing double quotes from mkstage4 script to the ${OPTIONS[@]} array
tar "${TAR_OPTIONS[@]}" "${INCLUDES[@]}" "${EXCLUDES[@]}" ${OPTIONS[@]} -f "$STAGE4_FILENAME" "${TARGET}"
and to the echo for the printed output
echo 'tar' "${TAR_OPTIONS[@]}" "${INCLUDES[@]}" "${EXCLUDES[@]}" ${OPTIONS[@]} -f "$STAGE4_FILENAME" "${TARGET}"
So TAR can recognized the single custom option now
edit : or update "Shifts pointer to read custom tar options"
for custom_opts in $@ ; do OPTIONS+=("$custom_opts") ; done ((${#OPTIONS[@]} == 1)) && [ -z "${OPTIONS[0]}" ] && unset OPTIONS
Got this ok :
--exclude=/mnt/bind-home/usr/portage/* --totals -v --strip-components=2 -f /run/media/nykay/Backup-1/tar/test-home.tar.bz2 /mnt/bind-home/
hope to helpful