Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Mar 2017 18:43:54 +0100
From:      Polytropon <freebsd@edvax.de>
To:        Adam Vande More <amvandemore@gmail.com>
Cc:        Arthur Chance <freebsd@qeng-ho.org>, FreeBSD Questions <freebsd-questions@freebsd.org>, Ernie Luzar <luzar722@gmail.com>
Subject:   Re: command line history broken in 11.0
Message-ID:  <20170321184354.0e19582c.freebsd@edvax.de>
In-Reply-To: <CA%2BtpaK1rW1soa16zaiCfWkSE%2Bp=i_m72fAJKi0K7GFbFZ3Krqg@mail.gmail.com>
References:  <58D019EE.9030508@gmail.com> <e5c3cb42-e160-f6a8-24f6-05860f13decf@qeng-ho.org> <20170321161947.f34a308d.freebsd@edvax.de> <CA%2BtpaK1rW1soa16zaiCfWkSE%2Bp=i_m72fAJKi0K7GFbFZ3Krqg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 21 Mar 2017 12:35:10 -0500, Adam Vande More wrote:
> On Tue, Mar 21, 2017 at 10:19 AM, Polytropon <freebsd@edvax.de> wrote:
> 
> > 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".
> 
> 
> That statement is true on Linux, not FreeBSD.

It is "funcationally equivalent" (basically does the same), but
differs in _how_ it does it (especially regarding program
termination prior to shutdown).



> > Both things do the same.
> > From "man reboot":
> >
> 
> From "man reboot:" emphasis mine.
> 
> Normally, the shutdown(8) utility is used when the system needs to be
>      halted or restarted, giving users advance warning of their impending
> doom
>      and ***cleanly terminating specific programs***.
> 
> See the init source if you question this.

I do not, and even "man shutdown" mentions the specific difference
(see -o option); "halt" and "reboot" have a specific own life, but
"shutdown" will rely on init for certain tasks.




-- 
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170321184354.0e19582c.freebsd>