mirror of
https://github.com/mynodebtc/mynode.git
synced 2024-11-11 16:09:16 +00:00
Remove need for get-device-serial to run as root
This commit is contained in:
parent
418f89c5cc
commit
2aa404d4b5
|
@ -21,7 +21,8 @@ else
|
|||
SERIAL_NUM=$(cat /proc/cpuinfo | grep Serial | cut -d ' ' -f 2)
|
||||
if [[ "$SERIAL_NUM" == "" ]]; then
|
||||
# Caution - dmidecode seem to cause issues on some platforms (used on VM)
|
||||
SERIAL_NUM=$(sudo dmidecode | grep UUID | cut -d ' ' -f 2)
|
||||
#SERIAL_NUM=$(sudo dmidecode | grep UUID | cut -d ' ' -f 2)
|
||||
SERIAL_NUM=$(cat /tmp/dmidecode_serial)
|
||||
if [[ "$SERIAL_NUM" == "03000200-0400-0500-0006-000700080009" ]]; then
|
||||
# Some mini PCs return this hard coded value
|
||||
SERIAL_NUM=$BACKUP_SERIAL
|
||||
|
|
|
@ -17,18 +17,8 @@ fi
|
|||
# Set sticky bit on /tmp
|
||||
chmod +t /tmp
|
||||
|
||||
# Make sure resolv.conf is a symlink to so resolvconf works
|
||||
# if [ ! -h /etc/resolv.conf ]; then
|
||||
# rm -f /etc/resolv.conf
|
||||
# mkdir -p /etc/resolvconf/run/
|
||||
# touch /etc/resolvconf/run/resolv.conf
|
||||
# ln -s /etc/resolvconf/run/resolv.conf /etc/resolv.conf
|
||||
|
||||
# sync
|
||||
# reboot
|
||||
# sleep 10s
|
||||
# exit 1
|
||||
# fi
|
||||
# Save dmidecode info
|
||||
dmidecode | grep UUID | cut -d ' ' -f 2 > /tmp/dmidecode_serial
|
||||
|
||||
# Add some DNS servers to make domain lookup more likely
|
||||
if settings_file_exists "skip_backup_dns_servers" ; then
|
||||
|
|
Loading…
Reference in New Issue
Block a user