#1590 PR merged: LogPrintError when sourcing unexpected named script (issue 1054)

Labels: enhancement, fixed / solved / done

jsmeix opened issue at 2017-11-21 16:24:

Now the SourceStage shows a (non fatal)
LogPrintError message to the user when a script
without leading 3-digit number 'NNN_' is sourced
because sripts without leading 3-digit number are
likely run in wrong order.

This is a further enhancement of
https://github.com/rear/rear/issues/1054
because scripts with the old 2-digit number could exist
as leftover as old/outdated user-specific addon scripts
that had been added during an older ReaR version.

Example how it looks now with two artificially added sripts
without leading 3-digit number 'NNN_':

# cp usr/share/rear/init/default/030_update_recovery_system.sh usr/share/rear/init/default/30_update_recovery_system.sh

# cp usr/share/rear/init/default/030_update_recovery_system.sh usr/share/rear/init/default/033update_recovery_system.sh

# usr/sbin/rear -s mkrescue | head
...
Script 'default/033update_recovery_system.sh' without leading 3-digit number 'NNN_' is likely run in wrong order
Source init/default/033update_recovery_system.sh
Script 'default/30_update_recovery_system.sh' without leading 3-digit number 'NNN_' is likely run in wrong order
Source init/default/30_update_recovery_system.sh
Source init/default/010_set_drlm_env.sh
Source init/default/030_update_recovery_system.sh

# usr/sbin/rear mkrescue
Script 'default/033update_recovery_system.sh' without leading 3-digit number 'NNN_' is likely run in wrong order
Script 'default/30_update_recovery_system.sh' without leading 3-digit number 'NNN_' is likely run in wrong order

[Export of Github issue for rear/rear.]