e93cffab1ee3f91a725268595fdcc79ed1c949d2
[myplc.git] / plc.d / bootmanager
1 #!/bin/bash
2 #
3 # priority: 1100
4 #
5 # Rebuild the Boot Manager
6 #
7 # Mark Huang <mlhuang@cs.princeton.edu>
8 # Copyright (C) 2006 The Trustees of Princeton University
9 #
10 # $Id: guest.init,v 1.12 2006/04/04 22:09:47 mlhuang Exp $
11 #
12
13 # Source function library and configuration
14 . /etc/plc.d/functions
15
16 case "$1" in
17     start)
18         if [ "$PLC_BOOT_ENABLED" != "1" -a \
19              "$PLC_WWW_ENABLED" != "1" ] ; then
20             return 0
21         fi
22
23         MESSAGE=$"Rebuilding Boot Manager"
24         dialog "$MESSAGE"
25
26         # Customize the Boot Manager
27         pushd /var/www/html/boot
28         /usr/share/bootmanager/build.sh
29         check
30         popd
31
32         result "$MESSAGE"
33         ;;
34 esac
35
36 exit $ERRORS