mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-27 00:21:44 +02:00
Merge pull request #191 from philips/relative-link
Fixup all of the symlinks in set_lsb_release
This commit is contained in:
commit
d68b8ece3f
@ -75,8 +75,8 @@ fi
|
|||||||
# COREOS_RELEASE_TRACK and COREOS_RELEASE_VERSION are used by the software
|
# COREOS_RELEASE_TRACK and COREOS_RELEASE_VERSION are used by the software
|
||||||
# update service.
|
# update service.
|
||||||
# DISTRIB_* are the standard names for the same values.
|
# DISTRIB_* are the standard names for the same values.
|
||||||
sudo mkdir -p "${ROOT_FS_DIR}/etc"
|
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos"
|
||||||
sudo_clobber "${ROOT_FS_DIR}/etc/lsb-release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/lsb-release" <<EOF
|
||||||
DISTRIB_ID=$COREOS_VERSION_NAME
|
DISTRIB_ID=$COREOS_VERSION_NAME
|
||||||
DISTRIB_RELEASE=$COREOS_VERSION_STRING
|
DISTRIB_RELEASE=$COREOS_VERSION_STRING
|
||||||
DISTRIB_CODENAME="napping to fan noise / silence. the build successful / type git bisect good"
|
DISTRIB_CODENAME="napping to fan noise / silence. the build successful / type git bisect good"
|
||||||
@ -90,6 +90,9 @@ COREOS_AUSERVER=$COREOS_VERSION_AUSERVER
|
|||||||
COREOS_DEVSERVER=$COREOS_VERSION_DEVSERVER
|
COREOS_DEVSERVER=$COREOS_VERSION_DEVSERVER
|
||||||
EOF
|
EOF
|
||||||
|
|
||||||
|
sudo mkdir -p "${ROOT_FS_DIR}/etc"
|
||||||
|
sudo ln -sf "../usr/share/coreos/lsb-release" "${ROOT_FS_DIR}/etc/lsb-release"
|
||||||
|
|
||||||
# For things like python which read gentoo-release
|
# For things like python which read gentoo-release
|
||||||
sudo_clobber "${ROOT_FS_DIR}/etc/gentoo-release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/etc/gentoo-release" <<EOF
|
||||||
$COREOS_VERSION_NAME release $COREOS_VERSION_STRING
|
$COREOS_VERSION_NAME release $COREOS_VERSION_STRING
|
||||||
@ -98,7 +101,6 @@ EOF
|
|||||||
# Aaaannd for the new systemd world order
|
# Aaaannd for the new systemd world order
|
||||||
# os-release provides a separate build-id field, so split it from version
|
# os-release provides a separate build-id field, so split it from version
|
||||||
OS_ID=$(tr '[:upper:]' '[:lower:]' <<<"$COREOS_VERSION_NAME")
|
OS_ID=$(tr '[:upper:]' '[:lower:]' <<<"$COREOS_VERSION_NAME")
|
||||||
sudo mkdir -p "${ROOT_FS_DIR}/usr/share/coreos"
|
|
||||||
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/os-release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/os-release" <<EOF
|
||||||
NAME=$COREOS_VERSION_NAME
|
NAME=$COREOS_VERSION_NAME
|
||||||
ID=$OS_ID
|
ID=$OS_ID
|
||||||
@ -112,10 +114,7 @@ EOF
|
|||||||
# The first time through the image, we have an os-release from a package,
|
# The first time through the image, we have an os-release from a package,
|
||||||
# the second time through this script, we don't, so we need to test if it's
|
# the second time through this script, we don't, so we need to test if it's
|
||||||
# present before trying to remove it.
|
# present before trying to remove it.
|
||||||
if [[ -a "${ROOT_FS_DIR}/etc/os-release" ]] ; then
|
sudo ln -sf "../usr/share/coreos/os-release" "${ROOT_FS_DIR}/etc/os-release"
|
||||||
sudo rm "${ROOT_FS_DIR}/etc/os-release"
|
|
||||||
fi
|
|
||||||
sudo ln -s "/usr/share/coreos/os-release" "${ROOT_FS_DIR}/etc/os-release"
|
|
||||||
|
|
||||||
# Create the defaults for the coreos configuration files in the usr directory
|
# Create the defaults for the coreos configuration files in the usr directory
|
||||||
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF
|
sudo_clobber "${ROOT_FS_DIR}/usr/share/coreos/release" <<EOF
|
||||||
|
Loading…
x
Reference in New Issue
Block a user