New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Mkrescue: use the text editor that is available (vi: command not found) #1298
Comments
As far as I know it does not really matter Only for the REQUIRED_PROGS array it should matter |
The issue is not whether any editor is required or not. User experience will improve when Rear picks the editor that is available instead of having a hard-coded |
I guess this is a really difficult topic. To be correct we should be looking at So what is the best fall-back option? IMHO we should decide upon one editor which we always take along, e.g. To soften that we could go ahead and respect the |
Hi all! If I can vote for a default editor I will vote for Regards, |
I think "rear mkrescue" could inspect whatever The final fallback must be 'vi' and if that one @didacog @ProBackup-nl In general I think a ReaR rescue/recovery system must contain Regarding that "rear mkrescue" may not abort when |
@ProBackup-nl To reverse the question: why would you need an editor to recover when the source OS does not have any editor? We should try to avoid to over-commit ReaR with zillion of pre-condition tests. |
@gdha I think we should add "zillions of pre-condition tests" This way users get known in advance that something Of course there will be a reasonable compromise |
@jsmeix if a customized Linux distribution choose to remove an editor - ReaR would be broken if we force an editor. Therefore, I would avoid editors in the REQUIRED PROG array - it is an user option/decision to have an editor on-board (for security reasons). And, as such the user has to make sure DR works with ReaR without intervention required. That is what I meant by adding zillion of pre-condition tests. |
On the one hand I agree with @schlomo Therefore it is perhaps best to have another config variable When the user sets empty REAR_EDITOR in local.conf Alternatively the user can specify anything to be used E.g. the user may prefer EDITOR=/usr/bin/emacs |
@gdha The case was not that there is no editor at all on the source os. The case is that a different editor then 'vi' is on the original system. My Arch has 'nano' not 'vi'. |
As |
@gdha I enhanced the most important user dialogs with the generic choice My personal reason is that when I need to change something Accordingly in current ReaR the user can already call At least I will not have time for further enhancements here |
…3154) Create an empty usr/share/rear/skel/default/root/.vimrc to fix #3151 Furthermore in build/GNU/Linux/130_create_dotfiles.sh dynamically generate .bash_history entries depending on whether or not 'nano' and 'vi' are available, see #3151 (comment) and see #1306 regarding nano and #1298 when vi is not available.
…ear#3154) Create an empty usr/share/rear/skel/default/root/.vimrc to fix rear#3151 Furthermore in build/GNU/Linux/130_create_dotfiles.sh dynamically generate .bash_history entries depending on whether or not 'nano' and 'vi' are available, see rear#3151 (comment) and see rear#1306 regarding nano and rear#1298 when vi is not available.
…ear#3154) Create an empty usr/share/rear/skel/default/root/.vimrc to fix rear#3151 Furthermore in build/GNU/Linux/130_create_dotfiles.sh dynamically generate .bash_history entries depending on whether or not 'nano' and 'vi' are available, see rear#3151 (comment) and see rear#1306 regarding nano and rear#1298 when vi is not available.
line 22: vi: command not found
.Linux.conf contains at least 3 different editors in the PROGS array (to copy to the recovery env.):
Don't assume that vi is available
Image a slim (Arch) Linux installation (not those fat distros RHEL, Ubuntu, etcetera) that comes with no editor. A user has got a preference for a specific text editor, and only installs that text editor only.
No vi installed
When that text editor is not
vi
, then the ReaR recovery environment version 2.00 will show an error message when trying to edit the disk layout (for instance).Check for editor executable existence
Check that the editor is actually on the source system, before using that editor in 500_confirm_layout and similar vi dependant scripts
Mkrescue abort when no editor?
An additional improvement, might be to abort
mkrescue
when no (known) editor is available on the source system.More then 1 text editor on source?
Then try to guess the user favourite text editor?
No clue, then look for configuration option?
Still no clue, then ask the user?
The text was updated successfully, but these errors were encountered: