Commit 95caf7a7 authored by Vojtech Myslivec's avatar Vojtech Myslivec 🚀

Add serial-number wrapper function

parent f8fa598a
......@@ -292,3 +292,24 @@ get_device_type(){
esac
}
# --------------------------------------------------------------------
do_serial() {
local device_type
cache_init
device_type=$(get_device_type)
if [ "$device_type" = "$TYPE_ATSHA" ]; then
debug "Call atsha serial-number"
cached_atsha_serial
elif [ "$device_type" = "$TYPE_OTP" ]; then
debug "Call otp serial-number"
cached_otp_serial
else
error "Unsupported device_type '$device_type'"
return 2
fi
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment