suvayu ali wrote:
On Sat, Mar 24, 2012 at 12:39, Frantisek Hanzlik franta@hanzlici.cz wrote:
suvayu ali wrote:
On Sat, Mar 24, 2012 at 10:46, Frantisek Hanzlik franta@hanzlici.cz wrote:
IMO it is problem in newer bash versions, but yet more I suspect when it may be any cripled systemd behavior at init 0/6 (sorry, i want say poweroff.target/reboot.target ;), whether systemd (in order to halt/reboot computer several microseconds faster) kill bash before it is able save their stuff.
This is just a ridiculous claim. Do you have any evidence to support this claim?
And more - at several important machines when I want reboot them, I press for logging off and then login on for this only "shutdown -r now" command. And by then I at these machines not observed problems with bash history. Maybe it is speculation, but seem for me as systemd causation.
I have used shutdown many times since Fedora switched to systemd. It has always worked for me. I think your problem is more likely due to some options or commands in your bashrc and profile files. If you really believe another program is to blame, I would rather investigate programs which interact with your desktop session more closely (e.g. your terminal emulator, your desktop's session manager, some faulty cron job, a bug in some script, ... I can keep going), rather than point fingers at systemd.
If I were you, I would check some of the following:
- Do you use any kind of history manipulation commands in your rc or profile files (e.g. any commands like `history <options>`)?
- Do you have any history related environment variable set to some undefined value (could be a typo, a change in compatibility between versions, or some other reason)?
- Do you have anything in your prompt related variables that could be misbehaving (e.g. PS1, PROMPT_COMMAND, etc)?
- Do you have some stray old rc file messing up the settings?
- Could there be some rc files from some other compatible shell interfering with your bash instance?
When the problem occurs again, I would also check for the last modification time and size of your history file to confirm the observation.
Franta
Hope the pointers above help.
Hmm, I'm only not systemd fanatical sectarian. It is program as others, new thing, with bugs, is evolving according to system/distributions needs. IMO tell something as described here: http://0pointer.de/blog/projects/why.html without single false point to systemd, it simply isn't true.
Regarding Your recommendations - I personally think problem isn't there (with F15 I switched to Xfce, but desktop manager probably isn't culprit as at some machines where problem occurs I'm working only in console. System and user profile/bashrc are Fedora's original (only difference is "HISTORY=10000" in /etc/profile, and several aliases in root's .bashrc (for rpm, I use these for years), nothing else. Points 1)-5) too aren't probable/possible - they not exist or their resulst would be more predictable.
Now occurred to me that i can watch several (mainly roots) history files by incrond and start some script which log some events on it. Maybe it helps. Thanks.