With FreeBSD 12.1-RELEASE-p11
as my NomadBSD 1.3
starting point:
open Sakura
pkg install nano
echo "set --export EDITOR /usr/local/bin/nano" >> ~/.config/fish/config.fish
echo "set --export VISUAL /usr/local/bin/nano" >> ~/.config/fish/config.fish
sudo echo "setenv EDITOR /usr/local/bin/nano" >> /private/home/nomad/.cshrc
sudo echo "setenv VISUAL /usr/local/bin/nano" >> /private/home/nomad/.cshrc
open a new tab
sudo freebsd-update -r 12.2-RELEASE upgrade
– still, for files that can not be merged automatically, there’s the direction to
… edit this file in /usr/bin/vi and resolve the conflicts manually…
Please, what am I missing?
How can I force the upgrade routine to not drop me down the vi
rabbit hole?
lme
December 23, 2020, 7:45pm
2
You should set it also in /etc/profile. freebsd-update is run by root who uses sh(1) as shell.
1 Like
Thanks!
Not mentioned in the opening post but I did also set variables in
/private/home/nomad/.profile
I edited
/etc/profile
– then retried the upgrade command, again it directed me to use vi.
OS restarted, I’ll retry and if necessary take a closer look.
I thought I set the variables correctly but I don’t see them in env
of sh
for root.
Please, how exactly should I make the entries in /etc/profile
?
Thanks, done, but still I don’t see the variable when I run sh
then env
as root.
My mistake. To edit the relevant files I was routinely using nano
after sh
then editing without specifying a path and forgetting to cd
Still, I get this, for example:
The following file could not be merged automatically: /etc/freebsd-update.conf
Press Enter to edit this file in /usr/bin/vi and resolve the conflicts
manually...
/etc/profile
was probably the solution although I lost track of the range of changes with which I experimented!
Ultimately I got what I wanted by not taking this approach:
sudo freebsd-update -r 12.2-RELEASE upgrade
– instead:
sudo su
followed by freebsd-update -r 12.2-RELEASE upgrade
lme
December 25, 2020, 12:32pm
8
sudo -E freebsd-update ...
should also work. -E keeps your environment variables.
2 Likes
Donald
December 30, 2020, 5:06pm
9
That absolutely worked. Thank you very much for that post. Happy New Year.
1 Like