diff --git a/create_offlinerepo.sh b/create_offlinerepo.sh
index 8fd396349c2c7806b401fe05f8784110230f8cbb..4fb3b0d9a07b8a2443c0f66e9871b6a50ef26a95 100755
--- a/create_offlinerepo.sh
+++ b/create_offlinerepo.sh
@@ -26,13 +26,11 @@ mkdir -p "$dest"
 7z e -so "$iso_file" casper/filesystem.squashfs > "$workspace"/offlinerepo/filesystem.squashfs
 unsquashfs -no-xattrs -d "$workspace"/offlinerepo/squashfs-root "$workspace"/offlinerepo/filesystem.squashfs 
 
-ISO_RELEASE="$(grep DISTRIB_CODENAME "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d= -f 2-)"
-ISO_VERSION="$(grep DISTRIB_RELEASE "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d= -f 2-)"
-ISO_DESCRIPTION="$(grep DISTRIB_DESCRIPTION "$workspace/offlinerepo/squashfs-root/etc/lsb-release" | cut -d'"' -f 2)"
-echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE} main restricted universe multiverse" > "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
-echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-security main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
-echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-updates main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
-echo "deb $APT_SOURCE_URL_OVERRIDE ${ISO_RELEASE}-backports main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
+source "$workspace/offlinerepo/squashfs-root/etc/lsb-release"
+echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME} main restricted universe multiverse" > "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
+echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-security main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
+echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-updates main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
+echo "deb $APT_SOURCE_URL_OVERRIDE ${DISTRIB_CODENAME}-backports main restricted universe multiverse" >> "$workspace/offlinerepo/squashfs-root/etc/apt/sources.list"
 apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
 
 {
@@ -41,12 +39,12 @@ apt-get -o Dir="$workspace"/offlinerepo/squashfs-root update
 } | cut -d"'" -f2 | while read url; do wget -q -nc -P "$dest" "$url"; done
 apt-get -o Dir="$workspace"/offlinerepo/squashfs-root install --reinstall --print-uris -qq $packages
 
-mkdir -p "$dest/dists/$ISO_RELEASE/lip/binary-amd64"
-( cd "$dest" && dpkg-scanpackages . | gzip > "dists/$ISO_RELEASE/lip/binary-amd64/Packages.gz" )
+mkdir -p "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64"
+( cd "$dest" && dpkg-scanpackages . | gzip > "dists/$DISTRIB_CODENAME/lip/binary-amd64/Packages.gz" )
 
-cat <<EOF > "$dest/dists/$ISO_RELEASE/lip/binary-amd64/Release"
-Archive: $ISO_RELEASE
-Version: $ISO_VERSION
+cat <<EOF > "$dest/dists/$DISTRIB_CODENAME/lip/binary-amd64/Release"
+Archive: $DISTRIB_CODENAME
+Version: $DISTRIB_RELEASE
 Component: lip
 Origin: Ubuntu
 Label: Ubuntu
@@ -57,13 +55,13 @@ touch "$dest/.aptignr"
 cat <<EOF > "$dest/Release"
 Origin: Ubuntu
 Label: LIP Ubuntu Extra Packages
-Suite: $ISO_RELEASE
-Version: $ISO_VERSION
-Codename: $ISO_RELEASE
+Suite: $DISTRIB_CODENAME
+Version: $DISTRIB_RELEASE
+Codename: $DISTRIB_CODENAME
 Date: $(LC_ALL=C date -u)
 Architectures: amd64
 Components: lip
-Description: $ISO_DESCRIPTION
+Description: $DISTRIB_DESCRIPTION
 EOF
 
 # Maybe sort files into the usual directory structure ("pool/main/g/glib2.0...")