Skip to content

Commit

Permalink
Mkdir /host/run/elemental in suc-upgrade
Browse files Browse the repository at this point in the history
Signed-off-by: Fredrik Lönnegren <fredrik.lonnegren@suse.com>
  • Loading branch information
frelon committed Dec 15, 2023
1 parent 4c00629 commit 8c91c9b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions framework/files/usr/sbin/suc-upgrade
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ LOCK_TIMEOUT="${LOCK_TIMEOUT:-600}"
LOCK_FILE="${LOCK_FILE:-$HOST_DIR/run/elemental/upgrade.lock}"
ACTIVE_FILE="${ACTIVE_FILE:-$HOST_DIR/run/elemental/active_mode}"

mkdir -p $HOST_DIR/run/elemental

function config()
{
if [ ! -s $CONF_FILE ]; then
Expand Down Expand Up @@ -102,9 +104,9 @@ function isActiveSystem() {
# After elemental upgrade we have to also copy
# /etc/resolv.conf from /host filesystem, otherwise
# it will be taken from container context
mount -o remount,rw /run/initramfs/cos-state
mount -o remount,rw /run/initramfs/elemental-state
LOOP_DEV=$(losetup -f)
losetup $LOOP_DEV /run/initramfs/cos-state/cOS/active.img
losetup $LOOP_DEV /run/initramfs/elemental-state/cOS/active.img
mkdir -p /tmp/cOS
mount $LOOP_DEV /tmp/cOS
rsync -av $HOST_DIR/etc/resolv.conf /tmp/cOS/etc/resolv.conf
Expand Down

0 comments on commit 8c91c9b

Please sign in to comment.