WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: [SOLVED] persistant shutdown of TC from ssh  (Read 7602 times)

Offline hca

  • Newbie
  • *
  • Posts: 7
[SOLVED] persistant shutdown of TC from ssh
« on: August 13, 2011, 10:16:29 AM »
with TC running headless, what is the correct way to initiate a normal persistent shutdown as the gui shutdown would from the command line and or via ssh?

By headless I really mean, normal boot with X sever up but no local screen or kyb/mouse.

exittc as called by the window manager causes a seg fault from command line, I saw a post from may about this sort of thing referring to micro core, but it did not seem to help.

Normally the standard nix shutdown is fine, but not if i have changed a config i want persistent for the next reboot.


Reg HC

« Last Edit: August 13, 2011, 12:20:16 PM by hca »

Offline gerald_clark

  • TinyCore Moderator
  • Hero Member
  • *****
  • Posts: 4254
Re: persistant shutdown of TC from ssh
« Reply #1 on: August 13, 2011, 10:48:46 AM »
/usr/bin/exitcheck.sh

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: persistant shutdown of TC from ssh
« Reply #2 on: August 13, 2011, 10:55:42 AM »
What exittc does is do a backup if the box is ticked, and then call exitcheck.sh $action.

From a cli a backup and poweroff would be:

filetool.sh -b
exitcheck.sh shutdown
The only barriers that can stop you are the ones you create yourself.

Offline hca

  • Newbie
  • *
  • Posts: 7
Re: persistant shutdown of TC from ssh
« Reply #3 on: August 13, 2011, 12:19:23 PM »
Ok thanks folks,

I tried the filetool.sh before but with backup rather than -b.

Thus I have 2 new scripts below for any one who might need.

This Tiny core makes old HP5530 thin clients into rather useful devices, beats the daylights out of WRT54's and sd cards!

reg HCA.



1- power-down

#!/bin/sh


filetool.sh -b
exitcheck.sh shutdown
exit


and 2- power-cycle

filetool.sh -b
exitcheck.sh reboot
exit