#!/bin/sh

sn=`cat /proc/cpuinfo |grep "Serial"|awk {'print $3'}`
if [ $? -eq 0 ]
then
    sqlite3 /work/iot_cfg.db  "update machine set id='FZ$sn'"
    if [ $? -eq 0 ]
    then
        echo "ok!"
    else 
        echo "error!"
    fi
else 
    echo "not found sn."
fi


