]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blob - src/initscripts/init.d/fireinfo
fireinfo: generate pakfire uuid if not present.
[people/pmueller/ipfire-2.x.git] / src / initscripts / init.d / fireinfo
1 #!/bin/sh
2 ########################################################################
3 # Begin $rc_base/init.d/fireinfo
4 #
5 # Description : Fireinfo profile generator
6 #
7 # Authors : IPFire Team
8 #
9 # Notes : This script saves the fireinfo profile to a file which
10 # is needed to show that information on the webinterface.
11 # No data is sent to the server.
12 #
13 ########################################################################
14
15 . /etc/sysconfig/rc
16 . ${rc_functions}
17
18 case "${1}" in
19 start)
20 mkdir -p /var/ipfire/fireinfo 2>/dev/null
21
22 # Generate Pakfire uuid if not present
23 if [ ! -e /opt/pakfire/db/uuid ]; then
24 uuidgen > /opt/pakfire/db/uuid
25 fi
26
27 sendprofile --public-id > /var/ipfire/fireinfo/public_id
28 sendprofile --dump > /var/ipfire/fireinfo/profile
29 ;;
30
31 *)
32 echo "Usage: ${0} {start}"
33 exit 1
34 ;;
35 esac
36
37 # End $rc_base/init.d/fireinfo