i'am running live linux, which run from FAT32 flashdisk since i run a lot of pc using this flashdisk, its difficult to identify which IP for its hostname, since its ip need to be dynamically determined by dhcp, so i want set their hostname by volume label that is set on its flasdisk
i can use blkid | grep sda1
or blkid | grep "vfat"
the results is
#blkid | grep sda1
/dev/sda1: LABEL="SLAX" UUID="FAEB-513E" TYPE="vfat"
#blkid | grep "vfat"
/dev/sda1: LABEL="SLAX" UUID="FAEB-513E" TYPE="vfat"
but how to parse its label and set to my hostname on boot?