Fix: issue with os-release name being doubled
This commit is contained in:
parent
89bb0a394a
commit
13b65354f9
@ -1676,12 +1676,9 @@ install_main()
|
|||||||
install_login
|
install_login
|
||||||
|
|
||||||
# changing distro name?
|
# changing distro name?
|
||||||
if grep -q 'ArchLabs' "$MNT/etc/os-release" && [[ $DIST != 'ArchLabs' ]]; then
|
if [[ -f "$MNT/etc/os-release" ]] && ! grep -q "$DIST" "$MNT/etc/os-release"; then
|
||||||
sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/lsb-release"
|
n=$(awk '/^NAME=/ {gsub(/^NAME=|"|'\''/, ""); print $1}' "$MNT/etc/os-release" 2> /dev/null)
|
||||||
sed -i "s/ArchLabs/$DIST/g" "$MNT/etc/os-release"
|
sed -i "s/$n/$DIST/g" "$MNT/etc/os-release"
|
||||||
else
|
|
||||||
sed -i "s/Arch/$DIST/g" "$MNT/etc/lsb-release"
|
|
||||||
sed -i "s/Arch/$DIST/g" "$MNT/etc/os-release"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# allow members of the wheel group to run commands as root
|
# allow members of the wheel group to run commands as root
|
||||||
|
Reference in New Issue
Block a user