OS-release 설정값을 변경해서 어플리케이션에서 읽어오는 OS 릴리즈 정보 속이기

openSUSE -> SLES (SuSE Linux Enterprise Server)

테스트 환경 : openSUSE Leap 15.1

단순 테스트 용도로 설치할 때만 사용할 !!

 

현재 OS 릴리즈 정보 확인

hanadb:/etc # cat /etc/os-release

NAME="openSUSE Leap"

VERSION="15.1"

ID="opensuse-leap"

ID_LIKE="suse opensuse"

VERSION_ID="15.1"

PRETTY_NAME="openSUSE Leap 15.1"

ANSI_COLOR="0;32"

CPE_NAME="cpe:/o:opensuse:leap:15.1"

BUG_REPORT_URL="https://bugs.opensuse.org"

HOME_URL="https://www.opensuse.org/"

 

현재 OS 릴리즈 정보 백업

hanadb:/etc # cp /etc/os-release /etc/os-release_bak

 

VI 에디터로 OS 릴리즈 정보 변경

hanadb:/etc # vi /etc/os-release

NAME="SLES"

VERSION="15-SP1"

VERSION_ID="15.1"

PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"

ID="sles"

ANSI_COLOR="0;32"

CPE_NAME="cpe:/o:suse:sles:15:sp1"

 

변경된 OS 릴리즈 정보 확인

hanadb:/etc # cat /etc/os-release

NAME="SLES"

VERSION="15-SP1"

VERSION_ID="15.1"

PRETTY_NAME="SUSE Linux Enterprise Server 15 SP1"

ID="sles"

ANSI_COLOR="0;32"

CPE_NAME="cpe:/o:suse:sles:15:sp1"

 

참고자료:

https://en.opensuse.org/SDB:SUSE_and_openSUSE_Products_Version_Outputs

+ Recent posts