| 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 | |
|---|
| 11 | import os |
|---|
| 12 | import settings |
|---|
| 13 | from pxe.models import * |
|---|
| 14 | from pxe.common import * |
|---|
| 15 | |
|---|
| 16 | for 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 |
|---|