WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Do you 'halt' or 'poweroff'?  (Read 5448 times)

Offline hjkl

  • Newbie
  • *
  • Posts: 23
Do you 'halt' or 'poweroff'?
« on: December 10, 2008, 11:43:20 AM »
Hi,

I have been using 'sudo halt' to shut down my computer.
I think my DSL-2.0 uses 'halt -d -f -i -p' when I use 'halt'.
Because TinyCore uses Busybox's halt, things are little different.
When I use 'sudo halt' on TinyCore, I have to push the power button myself
to shut down the computer.  So, I use 'poweroff' instead.
Because 'halt' is shorter, I am thinking of making 'halt' call 'poweroff'.
But, I do not know if that's good or bad.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14535
Re: Do you 'halt' or 'poweroff'?
« Reply #1 on: December 10, 2008, 07:47:26 PM »
"sudo exitcheck.sh shutdown" turns the power off on my laptop, so you could have a look at the exitcheck.sh script for enlightenment...

Offline ^thehatsrule^

  • Administrator
  • Hero Member
  • *****
  • Posts: 1726
Re: Do you 'halt' or 'poweroff'?
« Reply #2 on: December 10, 2008, 08:03:29 PM »
If you want a shorter name to call halt, you might have to use a shell alias or something similar instead if you are worried about that.

FYI, exitcheck.sh shutdown will use poweroff

Offline hjkl

  • Newbie
  • *
  • Posts: 23
Re: Do you 'halt' or 'poweroff'?
« Reply #3 on: December 11, 2008, 01:41:39 PM »
Hi Juanito,
I didn't know about exitcheck.sh.  I took a look at it.  I like it.
Now, I can just type 'exitcheck.sh' to shut down my computer.

Hi ^thehatsrule^,
I will use a shell alias.

alias halt='exitcheck.sh'

In the end, I am glad that I asked about this.
Thank you for the answers.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: Do you 'halt' or 'poweroff'?
« Reply #4 on: December 13, 2008, 05:25:32 PM »
i usually use sudo su then shutdown, but since that does not appear to be an option (no shutdown) in tc, i used reboot.

what? reboot? yeah i was using it for shutdown -rn 0, a (probably naughty) thing i only use because it's faster than turning it off and on when i've got nothing mounted and i'm using toram. so i suppose for tc, poweroff.

Offline hjkl

  • Newbie
  • *
  • Posts: 23
Re: Do you 'halt' or 'poweroff'?
« Reply #5 on: December 18, 2008, 03:57:39 PM »
Hi tobiaus,

As I mentioned in my post, I started using 'exitcheck.sh'.
That means I also use 'poweroff' to shut down my computer on TinyCore.
However, I have an alias:

alias halt='exitcheck.sh'

in my /etc/profile.  This alias works when I use a Linux console.
So, I just type 'halt' to turn off the computer.  For now, I'm fine with the solution.

Offline tobiaus

  • Suspended
  • Hero Member
  • *****
  • Posts: 599
Re: Do you 'halt' or 'poweroff'?
« Reply #6 on: December 18, 2008, 05:12:49 PM »
an interesting solution. although when it comes to this task i'm usually happy to type what is necessary, i don't use alias very often.