Linux software power-up automatic upgrade program framework

Source: Internet
Author: User
Tags file copy get ip

1, set the device MAC address;


2, the Backstage call UDHCPC tool assigns the IP to the equipment: lets the multi-device can have the independent IP, guarantees the multi-device parallel upgrade, provides the guarantee for the mass production;


3, in the memory/temp directory to create temporary storage upgrade Package directory: To ensure that the directory of upgrade package files clean, convenient upgrade, kill the flash history software, to ensure that the new upgrade package of the entire directory of the file copy large flash provides enough storage control,


4, in the software call private method, read to the device upgrade with the NFS Configuration: NFS server IP address + directory, configuration file has a fixed format, to ensure the accuracy of the upgraded NFS files;


5. Determine if the NFS information read is correct;


6, call the private method to remove the "carriage return" in the private directory;


7, delay. Wait for UDHCPC to get IP success: because it takes a certain amount of time to get the IP assigned by the router or other device;


8. Mount NFS Directories by private means: usually the system () function is used directly;


9. Read the upgrade profile in the NFS server directory: Ensure that the upgrade package location and the name of the upgrade package are located in the specified directory for the NFS server configuration file;


10, using the STAT system call, determine whether the file/or folder in the specified directory exists: to ensure that the upgrade package is not in, but the original Flash software removed, resulting in the device can not be used normally;


11, copy the upgrade files under the specified directory to the/temp directory of the device memory to create the temporary storage upgrade package under the directory;


12, 11 step success, delete the original flash in the upgrade file;


13, copy the upgrade files under the directory of the/temp directory of device memory to create temporary storage upgrade package to Flash;


14, directly call the upgrade package software automatically run the software script, so that the device after the upgrade to automatically enter the state of work.



Linux software power-up automatic upgrade program framework

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.