cleanup scripts
This commit is contained in:
parent
c4d5e6af5c
commit
d8d53a8092
6 changed files with 12 additions and 5 deletions
|
|
@ -42,7 +42,8 @@ fi
|
|||
# enable the selected opkg package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -o "$opkg_package_file"
|
||||
echo -e "${YELLOW}INFO: Unzipping the opkg package ...${NC}"
|
||||
unzip -o "$opkg_package_file" >/dev/null 2>&1
|
||||
# add "/opt/etc/init.d/rc.unslung start" to $project_root/unpacked/squashfs-root/etc/rc.local before the exit 0 line
|
||||
result=$(grep "/opt/etc/init.d/rc.unslung start" "$ROOTFS_DIR/etc/rc.local")
|
||||
if [ -z "$result" ]; then
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ fi
|
|||
# enable the selected python package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -o "$python_package_file"
|
||||
echo -e "${YELLOW}INFO: Unzipping the python package ...${NC}"
|
||||
unzip -o "$python_package_file" >/dev/null 2>&1
|
||||
# extend the PATH to $project_root/unpacked/squashfs-root/etc/profile
|
||||
sed -i 's#export PATH="/usr/sbin:/usr/bin:/sbin:/bin"#export PATH="/usr/sbin:/usr/bin:/sbin:/bin:/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"#' "$ROOTFS_DIR/etc/profile"
|
||||
cd "$current_folder" || exit 8
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ fi
|
|||
# enable the selected ssh package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -o "$ssh_package_file"
|
||||
echo -e "${YELLOW}INFO: Unzipping the ssh package ...${NC}"
|
||||
unzip -o "$ssh_package_file" >/dev/null 2>&1
|
||||
# add "/opt/etc/init.d/rc.unslung start" to $project_root/unpacked/squashfs-root/etc/rc.local before the exit 0 line
|
||||
result=$(grep "/opt/etc/init.d/rc.unslung start" "$ROOTFS_DIR/etc/rc.local")
|
||||
if [ -z "$result" ]; then
|
||||
|
|
|
|||
|
|
@ -44,7 +44,8 @@ if ! opkg list-installed | grep -q curl; then
|
|||
fi
|
||||
|
||||
# Create link from /opt/etc/ssl/certs to /etc/ssl/certs
|
||||
ln -s /opt/etc/ssl/certs /etc/ssl
|
||||
echo -e "${YELLOW}Creating link from /opt/etc/ssl/certs to /etc/ssl/certs${NC}"
|
||||
ln -s /opt/etc/ssl/certs /etc/ssl >/dev/null 2>&1
|
||||
|
||||
# Copy ca.crt client.crt and client.key server.crt and server.key to /user in one command
|
||||
# Copy the files to /user
|
||||
|
|
|
|||
|
|
@ -42,7 +42,8 @@ fi
|
|||
# enable the selected ssh package
|
||||
current_folder="$PWD"
|
||||
cd "$target_folder" || exit 7
|
||||
unzip -o "$uart_package_file"
|
||||
echo -e "${YELLOW}INFO: Unzipping the UART package ...${NC}"
|
||||
unzip -o "$uart_package_file" >/dev/null 2>&1
|
||||
cd "$current_folder" || exit 8
|
||||
|
||||
echo -e "${GREEN}INFO: The UART package has been installed. Version: $uart_package ${NC}"
|
||||
|
|
|
|||
|
|
@ -85,6 +85,8 @@ if __name__ == "__main__":
|
|||
|
||||
# If current_boot_partition is bootA, run swupdate with bootB. example: now_A_next_B
|
||||
boot_partition = "now_A_next_B" if current_boot_partition == "bootA" else "now_B_next_A"
|
||||
print(f'Current boot partition: {current_boot_partition}')
|
||||
print(f'Running swupdate with boot partition: {boot_partition}')
|
||||
ssh.exec_command(f'swupdate_cmd.sh -i /mnt/UDISK/update.swu -e stable,{boot_partition} -k /etc/swupdate_public.pem')
|
||||
print("Update started... Please wait for the printer to reboot")
|
||||
# wait for the update to complete, the printer to reboot and then close the connection
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue