Changeset 5538


Ignore:
Timestamp:
Jul 17, 2017, 2:30:26 PM (23 months ago)
Author:
hectorgh
Message:

adding thin-client support

Location:
lliurex-shutdowner/trunk/fuentes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • lliurex-shutdowner/trunk/fuentes/debian/changelog

    r5486 r5538  
     1lliurex-shutdowner (0.92) xenial; urgency=high
     2
     3  * Adding dialog support for thin clients
     4  * Fixed user and display discovery
     5
     6 -- Hector Garcia Huerta <hectorgh@gmail.com>  Mon, 17 Jul 2017 14:29:25 +0200
     7
    18lliurex-shutdowner (0.91) xenial; urgency=high
    29
  • lliurex-shutdowner/trunk/fuentes/lliurex-shutdowner-common.install/usr/sbin/shutdown-lliurex

    r5537 r5538  
    99ret=os.system("lliurex-version -t server")
    1010is_thin=os.system("lliurex-version -x thin")
     11
     12thinclient_cron_file="/etc/cron.d/lliurex-shutdowner-thinclients"
    1113
    1214if ret==0:
     
    2527                continue
    2628        display=x[-1].lstrip("(").rstrip(")")
     29       
     30        # If thinclient_cron_file exists, this is being called from the server to show shutdown dialog
     31        # to thin clients
     32        # if this is being called from the server and thincron_file doesn't exist, then it means server
     33        # will handle every dialog call
     34       
     35        if is_thin==0 and os.path.exists(thincron_file):
     36                if len(display.split(":")[0].split("."))<4:
     37                        continue
     38       
    2739        if display not in displays:
    2840                displays.add(display)
     
    3648        os.system("/sbin/shutdown -h +%s"%wait_time)
    3749else:
    38         time.sleep(60*wait_time)
    39         os.system("n4d-client -r -m shutdown -c ShutdownerClient")
     50        if is_thin==0:
     51                if not os.path.exists(thincron_file):
     52                        # this means this is being called inside thin client
     53                        time.sleep(60*wait_time)
     54                        os.system("n4d-client -r -m shutdown -c ShutdownerClient")
     55                else:
     56                        #this means this is being called from the server
     57                        #Shutdown will be handled inside thin client
     58                        pass
    4059
Note: See TracChangeset for help on using the changeset viewer.