root/pxe/syncsystems

Revision e5e582bfb02593a628c358d97bd630ff91da7f41, 0.6 KB (checked in by Frederic Lepied <frederic.lepied@…>, 2 years ago)

use another level of symlinks to have the name of the system visible

  • Property mode set to 100755
Line 
1#!/usr/bin/python
2#---------------------------------------------------------------
3# Project         : pxemngr
4# File            : syncsystems
5# Version         : $Id$
6# Author          : Frederic Lepied
7# Created On      : Tue Sep  1 11:46:57 2009
8# Purpose         :
9#---------------------------------------------------------------
10
11import os
12import settings
13from pxe.models import *
14from pxe.common import *
15
16for s in System.objects.all():
17    l = Log.objects.filter(system=s).order_by('-date')
18    if len(l) > 0:
19        set_next_boot(l[0].system, l[0].boot_name.name)
20    else:
21        print 'no boot defined for', s.name
22
23# syncsystems ends here
Note: See TracBrowser for help on using the browser.