- whenever we generate a new self signed certificate, replace the
[myplc.git] / plc.d / bootcd
1 #!/bin/bash
2 #
3 # priority: 1000
4 #
5 # Rebuild the Boot CD
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 CD"
24         dialog "$MESSAGE"
25
26         # Customize the Boot CD
27         pushd /var/www/html/download
28         /usr/share/bootcd/build.sh
29         check
30         popd
31
32         result "$MESSAGE"
33         ;;
34 esac
35
36 exit $ERRORS