Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function modify_serial () {
- if ! SERIAL_NUMBER=$($VPD_BIN -f $FIRMWARE_FILE -g serial_number >> $LOGDIR/log.txt 2>&1) ; then
- die "Unable to capture the Serial Number. Please review the log, then reseat the clip and try again"
- fi
- if ! SERIAL_NUMBER=$(cat /dev/urandom | tr -dc 'A-Z0-9' | fold -w ${#SERIAL_NUMBER} | head -n 1 >> $LOGDIR/log.txt 2>&1) ; then
- die "Unable to create new serial. Please review the log and try again."
- fi
- if ! $VPD_BIN -f $FIRMWARE_FILE -s serial_number=$SERIAL_NUMBER >> $LOGDIR/log.txt 2>&1 ; then
- die "Serial number failed to write to firmware file. Please review the log and try again."
- fi
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement