更新 RMxxx_rgmii_toolkit.sh
This commit is contained in:
parent
f56cc1caf4
commit
dcbafa84bf
@ -439,9 +439,6 @@ change_hostname() {
|
|||||||
# Check if simpleadmin is installed and change_hostname.sh exists
|
# Check if simpleadmin is installed and change_hostname.sh exists
|
||||||
if [ -f "/usrdata/simpleadmin/console/menu/change_hostname.sh" ]; then
|
if [ -f "/usrdata/simpleadmin/console/menu/change_hostname.sh" ]; then
|
||||||
/usrdata/simpleadmin/console/menu/change_hostname.sh
|
/usrdata/simpleadmin/console/menu/change_hostname.sh
|
||||||
new_hostname=$(cat /etc/hostname)
|
|
||||||
echo -e "\e[1;32mHostname has been changed to: $new_hostname\e[0m"
|
|
||||||
echo -e "\e[1;33mPlease reboot the device for the change to take full effect.\e[0m"
|
|
||||||
else
|
else
|
||||||
# If script doesn't exist, download it from the project
|
# If script doesn't exist, download it from the project
|
||||||
echo -e "\e[1;32mDownloading hostname change script...\e[0m"
|
echo -e "\e[1;32mDownloading hostname change script...\e[0m"
|
||||||
@ -450,9 +447,6 @@ change_hostname() {
|
|||||||
curl -o /tmp/hostname_change/change_hostname.sh "$GITROOT/simpleadmin/console/menu/change_hostname.sh"
|
curl -o /tmp/hostname_change/change_hostname.sh "$GITROOT/simpleadmin/console/menu/change_hostname.sh"
|
||||||
chmod +x /tmp/hostname_change/change_hostname.sh
|
chmod +x /tmp/hostname_change/change_hostname.sh
|
||||||
/tmp/hostname_change/change_hostname.sh
|
/tmp/hostname_change/change_hostname.sh
|
||||||
new_hostname=$(cat /etc/hostname)
|
|
||||||
echo -e "\e[1;32mHostname has been changed to: $new_hostname\e[0m"
|
|
||||||
echo -e "\e[1;33mPlease reboot the device for the change to take full effect.\e[0m"
|
|
||||||
rm -rf /tmp/hostname_change
|
rm -rf /tmp/hostname_change
|
||||||
remount_ro
|
remount_ro
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user