Skip to content

Commit

Permalink
trivial: only run migration process one time
Browse files Browse the repository at this point in the history
  • Loading branch information
superm1 committed Jan 17, 2024
1 parent dd79eb4 commit 57796d6
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion debian/fwupd-snap.postinst
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
#!/bin/sh -e

if [ ! -d /root/snap/fwupd ]; then
MIGRATE=1
fi

# this will build the initial /root/snap/fwupd/current symlink
systemctl start snap.fwupd.fwupd.service

if [ "$1" = "configure" ]; then
# only migrate the first install of snap
if [ "$1" = "configure" ] && [ -n $MIGRATE ]; then
mkdir -p /root/snap/fwupd/current/etc/fwupd/remotes.d
if [ -f /etc/fwupd/fwupd.conf ]; then
cp /etc/fwupd/fwupd.conf /root/snap/fwupd/current/etc/fwupd/
Expand Down

0 comments on commit 57796d6

Please sign in to comment.