Skip to content

Commit

Permalink
Make lvm.conf patching work with lvm2 from 24.04 (canonical#589)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomponline authored Nov 6, 2024
2 parents 0d78bff + 98f2c84 commit a0a84ce
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions snapcraft/commands/daemon.start
Original file line number Diff line number Diff line change
Expand Up @@ -337,15 +337,15 @@ fi
echo "==> Setting up LVM configuration"
mkdir -p /etc/lvm/
sed \
-e "s#obtain_device_list_from_udev = 1#obtain_device_list_from_udev = 0#g" \
-e "s#cache_file_prefix = \"\"#cache_file_prefix = \"lxd\"#g" \
-e "s#udev_sync = 1#udev_sync = 0#g" \
-e "s#udev_rules = 1#udev_rules = 0#g" \
-e "s#use_lvmetad = 1#use_lvmetad = 0#g" \
-e "s#monitoring = 1#monitoring = 0#g" \
-e "s%# executable = \"/sbin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%g" \
-e "/# .*_executable =/s/# //g" \
-e "s#/usr/sbin/#${SNAP}/bin/#g" \
-e "s%\(# \)\?obtain_device_list_from_udev = 1%obtain_device_list_from_udev = 0%" \
-e "s%\(# \)\?cache_file_prefix = \"\"%cache_file_prefix = \"lxd\"%" \
-e "s%\(# \)\?udev_sync = 1%udev_sync = 0%" \
-e "s%\(# \)\?udev_rules = 1%udev_rules = 0%" \
-e "s%\(# \)\?use_lvmetad = 1%use_lvmetad = 0%" \
-e "s%\(# \)\?monitoring = 1%monitoring = 0%" \
-e "s%# executable = \"/s\?bin/dmeventd\"%executable = \"${SNAP}/bin/dmeventd\"%" \
-e "/# .*_executable =/s/# //" \
-e "s%/usr/s\?bin/%${SNAP}/bin/%" \
"${SNAP}/etc/lvm/lvm.conf" > /etc/lvm/lvm.conf

# Setup for OVN
Expand Down

0 comments on commit a0a84ce

Please sign in to comment.