Last active
January 16, 2018 08:14
-
-
Save jaybuidl/bfcc54abb0a0d7956d5126b194d914fb to your computer and use it in GitHub Desktop.
Runs lsb_release on the upstream distribution
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#for example "ubuntu_lsb_release -c -s" gives the ubuntu codename such as xenial or trusty | |
if [ ! -f /etc/upstream-release/lsb-release ] | |
then | |
# this is already ubuntu, delegate | |
/usr/bin/lsb_release $@ | |
exit 0 | |
fi | |
sudo mv /etc/lsb-release /etc/lsb-release.bak | |
sudo cp /etc/upstream-release/lsb-release /etc/lsb-release | |
/usr/bin/lsb_release $@ | |
sudo mv /etc/lsb-release.bak /etc/lsb-release |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment