vanhofen
6 years ago
4 changed files with 6 additions and 35 deletions
@ -1,17 +0,0 @@ |
|||||
#!/bin/sh |
|
||||
|
|
||||
. /etc/init.d/globals |
|
||||
|
|
||||
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 |
|
||||
;; |
|
||||
*) |
|
||||
echo "[$BASENAME] Usage: $0 {start}" |
|
||||
;; |
|
||||
esac |
|
@ -1,17 +0,0 @@ |
|||||
#!/bin/sh |
|
||||
|
|
||||
. /etc/init.d/globals |
|
||||
|
|
||||
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 |
|
||||
;; |
|
||||
*) |
|
||||
echo "[$BASENAME] Usage: $0 {start}" |
|
||||
;; |
|
||||
esac |
|
Loading…
Reference in new issue