﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	severity	resolution	keywords	cc
477	Mondorestore fails to edit with nano editor	Manuel Carreira Silva	Bruno Cornec	"I tried to use '''nano editor''' instead of vi, to edit system configuration files when using mondorestore.[[BR]]
So, I edited '''/etc/mindi/deplist.d/addon.conf''' and added '''/usr/bin/nano''' to the last line.[[BR]]
This way, nano will be added to the boot disc when using mondoarchive. I think this is the proper way to do it.[[BR]]
Then I tried the restore and I got a surprise :-([[BR]]

When mondorestore popped up a dialog box telling me ""You will now edit fstab, mtab, device.map and menu.lst/grub.cfg"", I pressed ""enter"" and instead having nano editing a file,  mondorestore continued without stopping until the next dialog box popped up  (""Label/Identify your ext2/ext3/ext4 partitions if necessary"")[[BR]]

After some research, I noticed that mondo tries to find one editor: pico, nano, e3em, e3vi and if it doesn't find any one, he selects ""vi"" by default.[[BR]]
But when I installed nano, mondo had some weird behaviour: [[BR]]

 '''he created a pico softlink to nano'''!
So, when trying to find the editor, mondo finds pico in the first place, which is a softlink to nano.[[BR]]
Then, when he chroots to /mnt/RESTORING he tries to load pico. But as pico does not exist there, and there is no softlink in the chroot system, 
the edition does not happen.[[BR]]

There is a block code, from line 898 to 904 in '''mindi-2.0.7.6/rootfs/sbin/init''' which '''is the cause of this issue''', and is confusing me. I don't understand 
why these softlinks are created!



{{{
#ctrlaltdel soft
for path in /usr.bin /usr/bin ; do
	fname=$path/nano
	[ -e ""$fname"" ] && ln -sf $fname /usr/bin/pico
done
res=`which nano 2> /dev/null`
[ ""$res"" ] && ln -sf /usr/bin/

}}}


I commented (#) all these lines, and then mondorestore let me edit all files successfully with the nano editor.



''Conclusion:''[[BR]]

At least in ArchLinux distro, this code it's not required. Nano is considered a pico editor clone, and there is no pico editor package.

''Question:''[[BR]]

'''Is this code needed by other distros?'''[[BR]]

'''Or it can be safely deleted?''' "	defect	closed	normal	2.2.9.7	mindi	2.2.9.5	major	fixed	editor nano softlink	
