Wake on lan/force shutdown



  • I support various training centres who like to

    1. Switch all the computers on in the morning and
    2. Switch them off again at the end of the day.

    The group of computers would be all the non-admin computers so it would be ok for them to be forced shutdown.

    I think I could do this without fog by the following:-
    [LIST]
    []maintain a list of mac addresses and IPs for the groups of PCs
    [
    ]php web page calls scripts:-
    [LIST]
    [*](switch on) To send a wol packet to each mac address
    * To send a net rpc SHUTDOWN message to each IP
    [/LIST]
    [/LIST]
    However, it seems that most of this is already built into Fog… I can immediately see that I’d need to use a different authentication schema at first, because these tutors don’t need any functionality related to imaging. So I would just have a basic authentication restriction via htaccess, and then write a page that will allow:

    [LIST]
    []Firstly the user to select the group name
    [
    ]Two buttons one to switch on and the other to force switch off all computers in that group.
    [/LIST]
    If possible this would be restricted to groups that begin with a prefix of some sort so that I could restrict which groups are shown in the list and therefore that are permitted to be switched on and shut down in that way.

    Questions:
    [LIST]
    []Would this be useful to anyone else?
    [
    ]Can anyone tell me some tips on how to achieve this?
    []What are the key components I’d have to understand? I have a good general knowledge of programming and Linux
    [
    ]What would be the hardest part of this do you think?
    [*]Would it actually be practical to create a new type of user, and add sections to the Fog gui for their use?
    [/LIST]


  • Moderator

    If you have the FOG Client installed on the workstations, you can specify sleep/shutdown times.



  • Hi Kevin,

    I tried it but it wasn’t very reliable with my windows XP boxen. I just found that the snap-in did not respond quickly enough, or at all in some cases. I am soon going to be installing zentyal with samba4 at which point I will probably open the firewall and look at running psexec or something like that and see if I can’t find a workaround somehow.

    Thanks for the tip.


  • group:cid:13:privileges:mods:members

    Just a thought, if you create a group in FOG and move all the PC’s you want into it. Then you could make a batch file with “shutdown /s /f /t 0” and save it as shutdown.cmd. Then you can upload that file as a snap-in to fog. Lastly, if you shut the computers down at a certain time at night everyday, you should be able to set the schedule the file to run using the Cron execution through FOG. Just a thought, i’ve never tried it, so I don’t know the results.



  • bump

    To be honest I’m only looking for a few tips so that I can start nosing around and trying to put together a frankenmod here rather than looking for a feature- although it would be really nice…


Log in to reply
 

352
Online

39.3k
Users

11.0k
Topics

104.4k
Posts

Looks like your connection to FOG Project was lost, please wait while we try to reconnect.