From de9828ea17a1118760c0b4e966c15ec2c768a94f Mon Sep 17 00:00:00 2001 From: "tristan.ramseyer" Date: Fri, 10 Nov 2017 10:54:31 +0100 Subject: [PATCH] Moved switch rfs script to application layer. --- recipes-extended/bash/bash/.bashrc | 1 - recipes-extended/bash/bash_%.bbappend | 2 +- .../medusa-scripts/medusa-scripts.bb | 22 ----------------- .../medusa-scripts/switch-rfs.sh | 24 ------------------- 4 files changed, 1 insertion(+), 48 deletions(-) delete mode 100644 recipes-medusa/medusa-scripts/medusa-scripts.bb delete mode 100644 recipes-medusa/medusa-scripts/medusa-scripts/switch-rfs.sh diff --git a/recipes-extended/bash/bash/.bashrc b/recipes-extended/bash/bash/.bashrc index 4b4e2fb..f452523 100644 --- a/recipes-extended/bash/bash/.bashrc +++ b/recipes-extended/bash/bash/.bashrc @@ -26,5 +26,4 @@ alias sstart='systemctl start' alias sstop='systemctl stop' # stromer specific aliases -alias srfs='/etc/scripts/switch-rfs.sh' alias version='/bin/cat /etc/medusa-version' diff --git a/recipes-extended/bash/bash_%.bbappend b/recipes-extended/bash/bash_%.bbappend index d6504ec..01c9111 100644 --- a/recipes-extended/bash/bash_%.bbappend +++ b/recipes-extended/bash/bash_%.bbappend @@ -4,7 +4,7 @@ SRC_URI += " \ file://.profile \ " -RDEPENDS_${PN} += " grep medusa-scripts medusa-version" +RDEPENDS_${PN} += " grep medusa-version" FILES_${PN}_append = " ${ROOT_HOME}" diff --git a/recipes-medusa/medusa-scripts/medusa-scripts.bb b/recipes-medusa/medusa-scripts/medusa-scripts.bb deleted file mode 100644 index b24ad62..0000000 --- a/recipes-medusa/medusa-scripts/medusa-scripts.bb +++ /dev/null @@ -1,22 +0,0 @@ -SUMMARY = "Stromer Medusa scripts" -LICENSE = "MIT" -LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302" - -PV = "${DISTRO_VERSION}" -PR = "${DISTRO_CODENAME}" -ERROR_QA_remove = "version-going-backwards" - -RDEPENDS_${PN} = "bash" - -SRC_URI += " \ - file://switch-rfs.sh \ -" - -FILES_${PN}_append = " \ - ${sysconfdir}/scripts/ \ -" - -do_install () { - install -d ${D}${sysconfdir}/scripts - install -m 0755 ${WORKDIR}/switch-rfs.sh ${D}${sysconfdir}/scripts/ -} diff --git a/recipes-medusa/medusa-scripts/medusa-scripts/switch-rfs.sh b/recipes-medusa/medusa-scripts/medusa-scripts/switch-rfs.sh deleted file mode 100644 index 69cf3b7..0000000 --- a/recipes-medusa/medusa-scripts/medusa-scripts/switch-rfs.sh +++ /dev/null @@ -1,24 +0,0 @@ -#!/bin/bash - -if df -T | grep 'ubi0:part0'; then - echo "part0 is mounted as active one" - if barebox-state -s partition=1; then - echo "part1 will be mounted as active one after reboot" - exit 0 - else - echo "active partition could not be changed" - exit 1 - fi -elif df -T | grep 'ubi0:part1'; then - echo "part1 is mounted as active one" - if barebox-state -s partition=0; then - echo "part0 will be mounted as active one after reboot" - exit 0 - else - echo "active partition could not be changed" - exit 1 - fi -else - echo "active partition could not be determined" - exit 1 -fi