From efb7a823b77725c730d78561f73cc173edd57503 Mon Sep 17 00:00:00 2001 From: Kay0u Date: Tue, 15 Feb 2022 12:03:17 +0100 Subject: [PATCH] remove lxd-p2c, add lxd-migrate & lxd-user --- scripts/backup | 3 ++- scripts/install | 2 +- scripts/remove | 3 ++- scripts/restore | 3 ++- scripts/upgrade | 7 ++++++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/scripts/backup b/scripts/backup index 68d5336..5d5c634 100755 --- a/scripts/backup +++ b/scripts/backup @@ -56,7 +56,8 @@ ynh_backup --src_path="/usr/local/bin/lxc-to-lxd" ynh_backup --src_path="/usr/local/bin/lxd" ynh_backup --src_path="/usr/local/bin/lxd-agent" ynh_backup --src_path="/usr/local/bin/lxd-benchmark" -ynh_backup --src_path="/usr/local/bin/lxd-p2c" +ynh_backup --src_path="/usr/local/bin/lxd-migrate" +ynh_backup --src_path="/usr/local/bin/lxd-user" ynh_backup --src_path="/etc/bash_completion.d/lxd-client" ynh_backup --src_path="/etc/dnsmasq.d/lxd" diff --git a/scripts/install b/scripts/install index 3beab44..d25d182 100755 --- a/scripts/install +++ b/scripts/install @@ -78,7 +78,7 @@ ynh_exec_warn_less make mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ -cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-p2c} /usr/local/bin +cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd diff --git a/scripts/remove b/scripts/remove index 9e35a2c..4bbf943 100755 --- a/scripts/remove +++ b/scripts/remove @@ -78,7 +78,8 @@ ynh_secure_remove --file="/usr/local/bin/lxc-to-lxd" ynh_secure_remove --file="/usr/local/bin/lxd" ynh_secure_remove --file="/usr/local/bin/lxd-agent" ynh_secure_remove --file="/usr/local/bin/lxd-benchmark" -ynh_secure_remove --file="/usr/local/bin/lxd-p2c" +ynh_secure_remove --file="/usr/local/bin/lxd-migrate" +ynh_secure_remove --file="/usr/local/bin/lxd-user" ynh_secure_remove --file="/etc/bash_completion.d/lxd-client" sed -i "/# Added by lxd$/{N;/root:100000:65536/d}" /etc/sub{u,g}id diff --git a/scripts/restore b/scripts/restore index ad88a27..b2e217f 100755 --- a/scripts/restore +++ b/scripts/restore @@ -78,7 +78,8 @@ ynh_restore_file --origin_path="/usr/local/bin/lxc-to-lxd" ynh_restore_file --origin_path="/usr/local/bin/lxd" ynh_restore_file --origin_path="/usr/local/bin/lxd-agent" ynh_restore_file --origin_path="/usr/local/bin/lxd-benchmark" -ynh_restore_file --origin_path="/usr/local/bin/lxd-p2c" +ynh_restore_file --origin_path="/usr/local/bin/lxd-migrate" +ynh_restore_file --origin_path="/usr/local/bin/lxd-user" ynh_restore_file --origin_path="/etc/bash_completion.d/lxd-client" ynh_restore_file --origin_path="/etc/dnsmasq.d/lxd" diff --git a/scripts/upgrade b/scripts/upgrade index 4b660e9..231db79 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,6 +23,11 @@ ynh_script_progression --message="Ensuring downward compatibility..." sed -i "/root:1000000:65536 # Added by lxd#/d" /etc/sub{u,g}id +# Remove old file +if [ -f "/usr/local/bin/lxd-p2c" ]; then + ynh_secure_remove --file="/usr/local/bin/lxd-p2c" +fi + #================================================= # BACKUP BEFORE UPGRADE THEN ACTIVE TRAP #================================================= @@ -96,7 +101,7 @@ ynh_exec_warn_less make mkdir -p /usr/local/lib/$app mkdir -p /var/log/$app cp -a ${GOPATH}/{raft,dqlite}/.libs/lib*.so* /usr/local/lib/$app/ -cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-p2c} /usr/local/bin +cp ${GOPATH}/bin/{fuidshift,lxc,lxc-to-lxd,lxd,lxd-agent,lxd-benchmark,lxd-migrate,lxd-user} /usr/local/bin cp ${lxd_tmp}/scripts/bash/lxd-client /etc/bash_completion.d/ popd