Skip to content

Commit 68da0d2

Browse files
authored
Preserve our /etc/os-release (#779)
1 parent 1403809 commit 68da0d2

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#!/bin/sh
2+
# Description: Revert dpkg-divert of /etc/os-release done by live-build
3+
# https://salsa.debian.org/live-team/live-build/-/blob/debian/1%2520250505/scripts/build/bootstrap_debootstrap?ref_type=tags#L125-142
4+
5+
echo "P: Begin executing revert-os-release-divert chroot hook..."
6+
7+
OS_RELEASE=/etc/os-release
8+
OS_RELEASE_DIVERTED="${OS_RELEASE}.debootstrap"
9+
10+
dpkg-divert --list "$OS_RELEASE" | grep -q "$OS_RELEASE"
11+
if [ $? -eq 0 ]; then
12+
mv "$OS_RELEASE_DIVERTED" "$OS_RELEASE"
13+
dpkg-divert --quiet --local --remove --no-rename --divert "$OS_RELEASE_DIVERTED" "$OS_RELEASE"
14+
fi

0 commit comments

Comments
 (0)