2 # -*- mode: shell-script; indent-tabs-mode: nil; sh-basic-offset: 4; -*-
3 # ex: ts=8 sw=4 sts=4 et filetype=sh
7 export SYSTEMD_LOG_LEVEL
=debug
9 portablectl attach
--now --runtime /usr
/share
/minimal_0.raw app0
11 systemctl is-active app0.service
12 systemctl is-active app0-foo.service
15 systemctl is-active app0-bar.service
&& exit 1
19 portablectl reattach
--now --runtime /usr
/share
/minimal_1.raw app0
21 systemctl is-active app0.service
22 systemctl is-active app0-bar.service
25 systemctl is-active app0-foo.service
&& exit 1
29 portablectl list |
grep -q -F "minimal_1"
31 portablectl detach
--now --runtime /usr
/share
/minimal_1.raw app0
33 portablectl list |
grep -q -F "No images."
35 # portablectl also works with directory paths rather than images
37 unsquashfs
-dest /tmp
/minimal_0
/usr
/share
/minimal_0.raw
38 unsquashfs
-dest /tmp
/minimal_1
/usr
/share
/minimal_1.raw
40 portablectl attach
--copy=symlink
--now --runtime /tmp
/minimal_0 app0
42 systemctl is-active app0.service
43 systemctl is-active app0-foo.service
46 systemctl is-active app0-bar.service
&& exit 1
50 portablectl reattach
--now --enable --runtime /tmp
/minimal_1 app0
52 systemctl is-active app0.service
53 systemctl is-active app0-bar.service
56 systemctl is-active app0-foo.service
&& exit 1
60 portablectl list |
grep -q -F "minimal_1"
62 portablectl detach
--now --enable --runtime /tmp
/minimal_1 app0
64 portablectl list |
grep -q -F "No images."