Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#477 closed defect (fixed)

Mondorestore fails to edit with nano editor

Reported by: MC Owned by: bruno
Priority: normal Milestone:
Component: mindi Version:
Severity: major Keywords: editor nano softlink


I tried to use nano editor instead of vi, to edit system configuration files when using mondorestore.
So, I edited /etc/mindi/deplist.d/addon.conf and added /usr/bin/nano to the last line.
This way, nano will be added to the boot disc when using mondoarchive. I think this is the proper way to do it.
Then I tried the restore and I got a surprise :-(

When mondorestore popped up a dialog box telling me "You will now edit fstab, mtab, 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")

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.
But when I installed nano, mondo had some weird behaviour:

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.
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.

There is a block code, from line 898 to 904 in mindi- 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
	[ -e "$fname" ] && ln -sf $fname /usr/bin/pico
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.


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.


Is this code needed by other distros?

Or it can be safely deleted?

Change History (2)

comment:1 Changed 8 years ago by bruno

  • Resolution set to fixed
  • Status changed from new to closed

You're perfectly right. That code comes from very old times, before I maintained mondo. And indeed it's wrong and now gone :-)

Cf: rev [2765]

Thanks for your report ! Bruno.

comment:2 Changed 8 years ago by bruno

  • Milestone changed from to
Note: See TracTickets for help on using tickets.