WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: TC4.1 Change Default Selection to Reboot on Exit?  (Read 2540 times)

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
TC4.1 Change Default Selection to Reboot on Exit?
« on: December 06, 2011, 05:23:00 AM »
When exiting TC, is there a way to force TC Exit Option to automatically select Reboot in preference to Shutdown?
   


Edit: Subject modified to more accurately indicate the goal.
« Last Edit: December 08, 2011, 11:28:56 AM by SamK »

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11044
Re: TC4.1 Force Reboot on Exit
« Reply #1 on: December 06, 2011, 07:08:38 AM »
Not ATM. A feature request?
The only barriers that can stop you are the ones you create yourself.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: TC4.1 Force Reboot on Exit
« Reply #2 on: December 06, 2011, 07:24:04 AM »
The reason for the enquiry is that when administrating a remote TC server machine (e.g. via VNC) it is less prone to errors to have the remote machine configured to automatically reboot rather than shutdown.
   

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: TC4.1 Force Reboot on Exit
« Reply #3 on: December 06, 2011, 03:50:29 PM »
If working on a remote system I personally prefer to work via CLI (well actually I tend to prefer it also for most work on local systems), and there you could achieve what your are after via a simple: sudo reboot

And if one is really "desperate" to have an icon that can be clicked then it would be simple to choose an icon and create a wrapper script and a .desktop file, and voilĂ  you've created a "GUI reboot application".
« Last Edit: December 06, 2011, 03:55:13 PM by maro »

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: TC4.1 Force Reboot on Exit
« Reply #4 on: December 07, 2011, 01:59:52 AM »
If working on a remote system I personally prefer to work via CLI (well actually I tend to prefer it also for most work on local systems), and there you could achieve what your are after via a simple: sudo reboot

And if one is really "desperate" to have an icon that can be clicked then it would be simple to choose an icon and create a wrapper script and a .desktop file, and voilĂ  you've created a "GUI reboot application".
Thanks for the suggestions but they don't really address the heart of the enquiry. 

Both the standard TC exit and the suggestions require the operator to make a choice and follow it with a particular action to obtain a reboot.  Having an option whereby the standard TC exit can be made to default to Reboot means the operator has to make a choice not to reboot.
   

Offline andrewb

  • Full Member
  • ***
  • Posts: 121
Re: TC4.1 Force Reboot on Exit
« Reply #5 on: December 07, 2011, 05:16:20 PM »
Change or overwrite exittc to have only 'sudo reboot' in it, add exittc to filetool.lst.  This will cause an immediate reboot when run, save the changes to the backup & reload them on reboot.

Make sure you've set a backup directory before you do this (Control panel -> backup).

[I'm writing this from memory - not at my TC machine at the moment. You may need more than just sudo reboot to ensure the backup occurs on shutdown]

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11586
Re: TC4.1 Force Reboot on Exit
« Reply #6 on: December 08, 2011, 01:17:04 AM »
exittc is not a script but a binary, which means SamK would have to modify the source and recompile.
It would probably be simpler to change the /sbin/poweroff link to point to /sbin/reboot instead
of /bin/busybox.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: TC4.1 Force Reboot on Exit
« Reply #7 on: December 08, 2011, 01:39:52 AM »
Again - thanks for the ideas.  They are closer to the desired outcome but don't quite hit the target.

I was hoping to find a way of doing this which is akin to the way that backup-on-exit is controlled, i.e. something similar to setting BACKUP=0/1 within ~/.profile.  This would have the advantages of:
  • Being within a user writable area
  • Not relying on a filetool.sh backup when persistent /home is used
   

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11586
Re: TC4.1 Force Reboot on Exit
« Reply #8 on: December 08, 2011, 02:03:06 AM »
Hi SamK
You could change the link from bootlocal and use a persistent /opt.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: TC4.1 Change Default Selection to Reboot on Exit?
« Reply #9 on: December 08, 2011, 03:19:17 AM »
Hi Rich
You could change the link from bootlocal and use a persistent /opt.
If I understand your suggestion correctly it would mean that it is not possible to shutdown the machine in the standard TC GUI manner.  This may lead to some confusion for the users.

I have changed the title of the topic in an attempt to more accurately indicate the goal.
   

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11586
Re: TC4.1 Force Reboot on Exit
« Reply #10 on: December 08, 2011, 10:46:14 AM »
Hi SamK
You understood correctly. My suggestion was based on remotely administrating a server and the
possible consequences of inadvertently shutting it down only, local users were not considered.
Without changing the source of exittc and recompiling, you will most likely have to resort to some
form of trickery to do what you want. The only other idea I have is to log in as a special user when
working remotely. Then modify the /opt/shutdown.sh script by adding a test to see if that is the
current user. If it is, then call /sbin/reboot. Add this to the very end of the script.

Offline SamK

  • Hero Member
  • *****
  • Posts: 713
Re: TC4.1 Change Default Selection to Reboot on Exit?
« Reply #11 on: December 08, 2011, 11:35:36 AM »
Hi Rich,
As suggested in reply #2, it might be that this turns out to be a feature request.  Perhaps it might attract the attention of the Devs.