forked from pool/fdo-client
Marcus Meissner
03570f9175
needs a devel project to submit to Factory OBS-URL: https://build.opensuse.org/request/show/969433 OBS-URL: https://build.opensuse.org/package/show/security/fdo-client?expand=0&rev=1
30 lines
865 B
Bash
30 lines
865 B
Bash
#!/bin/sh
|
|
check_file=/var/lib/fdo-client/initialized
|
|
data=/var/lib/fdo-client/data
|
|
log=/var/log/fdo-client.log
|
|
|
|
cd ${data}
|
|
|
|
if [ ! -f ${check_file} ]; then
|
|
# The first time the client will connect the manufacturer
|
|
# server in order to get information about rendevous service.
|
|
# After that the service will be stopped. The machine is now
|
|
# ready for delivery. Next time the machine will connect to
|
|
# the rendezvous service when it will be switched on.
|
|
/usr/bin/fdo-client >${log}
|
|
systemctl status fdoclient| grep 'Main PID' | awk '{print $3}' >${check_file}
|
|
/bin/systemctl stop fdoclient
|
|
exit 0
|
|
fi
|
|
|
|
while :
|
|
do
|
|
# The rendevous service returns the information about the
|
|
# prider platform service (only the first time). This service
|
|
# will be contacted periodically.
|
|
/usr/bin/fdo-client >>${log}
|
|
sleep 30;
|
|
done
|
|
|
|
|