fireinfo: generate pakfire uuid if not present.
authorArne Fitzenreiter <arne_f@ipfire.org>
Fri, 14 Jan 2011 09:39:23 +0000 (10:39 +0100)
committerArne Fitzenreiter <arne_f@ipfire.org>
Fri, 14 Jan 2011 09:39:23 +0000 (10:39 +0100)
src/initscripts/init.d/fireinfo

index bedf3a5..47565b3 100644 (file)
@@ -19,6 +19,11 @@ case "${1}" in
        start)
                mkdir -p /var/ipfire/fireinfo 2>/dev/null
 
+               # Generate Pakfire uuid if not present
+               if [ ! -e /opt/pakfire/db/uuid ]; then
+                   uuidgen > /opt/pakfire/db/uuid
+               fi
+
                sendprofile --public-id > /var/ipfire/fireinfo/public_id
                sendprofile --dump > /var/ipfire/fireinfo/profile
                ;;