You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
238 B
12 lines
238 B
#!/bin/sh
|
|
|
|
case $1 in
|
|
start)
|
|
if [ ! -f /etc/hostname ]; then
|
|
hwaddr=$(ifconfig eth0 | awk '/HWaddr/ { split($5,v,":"); print v[4] v[5] v[6] }')
|
|
echo "NI-FLASH-${hwaddr}" > /etc/hostname
|
|
fi
|
|
|
|
hostname -F /etc/hostname
|
|
;;
|
|
esac
|
|
|