| 1 |
#!/bin/sh |
| 2 |
|
| 3 |
set -e |
| 4 |
|
| 5 |
# Cleanup .pyc cached files from netplan.io versions older than 0.107-3. |
| 6 |
# After 0.107-3, the noncli-related code was moved away from |
| 7 |
# share/netplan/netplan, thanks to the new python3-netplan package, |
| 8 |
# but dpkg would leave this directory behind due to the .pyc files. |
| 9 |
# Cleaning it up here will leave the directory empty so dpkg will remove |
| 10 |
# it properly during the update process. |
| 11 |
|
| 12 |
if [ -d /usr/share/netplan/netplan ]; then |
| 13 |
find /usr/share/netplan/netplan/ -name '*.pyc' -delete |
| 14 |
find /usr/share/netplan/netplan/ -name '__pycache__' -delete |
| 15 |
fi |
| 16 |
|
| 17 |
#DEBHELPER# |