Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2017 14:31:34 +0000
From:      Arthur Chance <freebsd@qeng-ho.org>
To:        Ernie Luzar <luzar722@gmail.com>, freebsd-questions@FreeBSD.org
Subject:   Re: command line history broken in 11.0
Message-ID:  <e5c3cb42-e160-f6a8-24f6-05860f13decf@qeng-ho.org>
In-Reply-To: <58D019EE.9030508@gmail.com>
References:  <58D019EE.9030508@gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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.

-- 
By June 1949, people had begun to realize that it was not so easy to
get a program right as had at one time appeared. It was on one of my
journeys between the EDSAC room and the punching equipment that the
realization came over me with full force that a good part of the
remainder of my life was going to be spent in finding errors in my own
programs.

	-- Maurice Wilkes



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?e5c3cb42-e160-f6a8-24f6-05860f13decf>