#1566 PR merged: COPY_AS_IS_TSM optimzed example

Labels: documentation, fixed / solved / done

schabrolles opened issue at 2017-11-07 11:43:

Add an example of an optimized COPY_AS_IS_TSM.
This one will only copy dsmc binary, needed libraries, passwd and default configuration files.
All the other files generated by the user must be added manually.

schabrolles commented at 2017-11-07 11:44:

@jsmeix your feedback regarding wording is welcomed.
(I try to avoid the word: WARNING: ;-) )

jsmeix commented at 2017-11-07 13:21:

Personally I avoid emphasis in technical documentation
like your '**' characters or '!' exclamation marks
or even shouting at the poor reader: "DO NOT ... "
cf. how I documented MODULES=( 'no_modules' )
but in the end it is a matter of personal taste.

By the way:
I was wondering if the bash globbing character '*' in

# COPY_AS_IS_TSM=( /etc/adsm ... /usr/local/ibm/gsk8* )

shouldn't be usually quoted but I think there is a reason why
it must be specified unquoted in COPY_AS_IS arrays
so that bash pathname expansion works later
e.g. in build/GNU/Linux/100_copy_as_is.sh
as intended.
Because usr/sbin/rear sets nullglob (and extglob)
/usr/local/ibm/gsk8* expands to nothing if no file matches
which is probably the intended behaviour here because:

# ( shopt -s nullglob ; COPY_AS_IS=( /etc /etc/fst* /usr/local/ibm/gsk8* ) ; echo "${COPY_AS_IS[@]}" ) 
/etc /etc/fstab

# ( shopt -s nullglob ; COPY_AS_IS=( /etc "/etc/fst*" '/usr/local/ibm/gsk8*' ) ; echo "${COPY_AS_IS[@]}" ) 
/etc /etc/fst* /usr/local/ibm/gsk8*

Accordingly quoting bash globbing patterns in COPY_AS_IS
seems to lead to wrong results which is an unexpected
exception to the usual way how arrays should be specified
as documented at the beginning of default.conf.


[Export of Github issue for rear/rear.]