command line history broken in 11.0
freebsd at edvax.de
Tue Mar 21 15:19:58 UTC 2017
On Tue, 21 Mar 2017 14:31:34 +0000, Arthur Chance wrote:
> On 20/03/2017 18:05, Ernie Luzar wrote:
> > On 10.3 I had the current session saving the command line history when
> > issuing the shutdown, halt, and reboot command by using these alias
> > commands that I added to the .cshrc file of my logged in user account.
> > alias sd "exit && shutdown now"
> > alias sdp "exit && shutdown -p now"
> > alias rboot "exit && reboot"
> > alias stop "exit && halt"
> > Now after doing a clean install of 11.0 and using the same .cshrc file
> > the rboot and stop alias commands no longer save the current history.
> > They act like the exit command is not getting executed. The sd and sdp
> > alias commands are working as expected.
> > When existing from a session terminal by issuing the exit command does
> > still save the current history.
> > Is there an alternate method I can use?
> To the best of my understanding, reboot and halt should really only be
> used in single user mode, because they don't cleanly close down running
> programs - they're more like pulling the power plug after a couple of
> syncs. That's been the case for a long time now.
Basically, "reboot" is equivalent to "shutdown -r now", just
as "halt" is to "shutdown -h now". Both things do the same.
>From "man reboot":
The halt and reboot utilities flush the file system cache to disk, send
all running processes a SIGTERM (and subsequently a SIGKILL) and, respec-
tively, halt or restart the system. The action is logged, including
entering a shutdown record into the wtmp(5) file.
This is what shutdown does as well. But see "man shutdown",
especially option -o, for differences related to calling init.
Both variations should be fully safe to use from multi user mode.
The manpages don't say otherwise...
> Is there any reason for you not to use shutdown exclusively? The -p and
> -r modifiers give you power off and reboot abilities, and daemons get
> cleanly shut down, which may save you from a broken database one day.
Note: -p = power off, -h = halt (does _not_ power off); "halt -p"
and "shutdown -p now" perform the same task (shut down, then power
off), while "halt" and "shutdown -h now" keep the system powered
on after shutting down.
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions