#1124 Issue closed: Useless wrapup/rescue/default/600_add_galaxy_group.sh

Labels: cleanup, fixed / solved / done

jsmeix opened issue at 2016-12-14 09:44:

As far as I see
wrapup/rescue/default/600_add_galaxy_group.sh
exists but is never called.

Using current GitHub master code:

$ for f in usr/share/rear/lib/*-workflow.sh ; do grep -l wrapup $f ; done
usr/share/rear/lib/finalizeonly-workflow.sh
usr/share/rear/lib/layoutonly-workflow.sh
usr/share/rear/lib/recover-workflow.sh
usr/share/rear/lib/restoreonly-workflow.sh

I.e. only the recover layoutonly restoreonly finalizeonly workflows
call wrapup scripts.

Those are the actually called wrapup scripts:

# for w in recover layoutonly restoreonly finalizeonly ; do echo $w ; usr/sbin/rear -s $w | grep wrapup ; echo ; done
recover
23785: Source wrapup/default/500_post_recovery_script.sh
23785: Source wrapup/default/980_good_bye.sh
23785: Source wrapup/default/990_copy_logfile.sh

layoutonly

restoreonly
24435: Source wrapup/default/500_post_recovery_script.sh
24435: Source wrapup/default/980_good_bye.sh
24435: Source wrapup/default/990_copy_logfile.sh

finalizeonly

In particular no add_galaxy_group script is called directly:

$ find usr/sbin/rear usr/share/rear/* | xargs grep -l 'add_galaxy_group'
[no output]

Searching for the special word 'simpana' in
wrapup/rescue/default/600_add_galaxy_group.sh
finds in particular
rescue/GALAXY10/default/600_add_galaxy_group.sh
which is identical to
wrapup/rescue/default/600_add_galaxy_group.sh

Accordingly I will simply remove
wrapup/rescue/default/600_add_galaxy_group.sh
because it is dead code. As far as I see the right code is
rescue/GALAXY10/default/600_add_galaxy_group.sh

jsmeix commented at 2016-12-14 09:55:

Fixed via
https://github.com/rear/rear/pull/1125


[Export of Github issue for rear/rear.]