File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ declare -a kargs=( "$@" )
77ret=0
88args=$( chroot /host/ cat /proc/cmdline)
99
10+ IS_OS_UBUNTU=true; [[ " $( chroot /host/ grep -i ubuntu /etc/os-release -c) " == " 0" ]] && IS_OS_UBUNTU=false
11+
12+ # Kernel args configuration isn't supported for Ubuntu now, so we shouldn't do anything here
13+ if ${IS_OS_UBUNTU} ; then
14+ echo $ret
15+ exit 0
16+ fi
17+
1018if chroot /host/ test -f /run/ostree-booted ; then
1119 for t in " ${kargs[@]} " ; do
1220 if [[ $command == " add" ]]; then
Original file line number Diff line number Diff line change @@ -6,6 +6,7 @@ SUT_SCRIPT="${SCRIPTPATH}/../../bindata/scripts/kargs.sh"
66
77
88test_RpmOstree_Add_All_Arguments () {
9+ echo " ID=\" rhel\" " > ${FAKE_HOST} /etc/os-release
910 echo " a b c=d eee=fff" > ${FAKE_HOST} /proc/cmdline
1011 touch ${FAKE_HOST} /run/ostree-booted
1112
@@ -19,6 +20,7 @@ test_RpmOstree_Add_All_Arguments() {
1920
2021
2122test_RpmOstree_Add_Only_Missing_Arguments () {
23+ echo " ID=\" rhel\" " > ${FAKE_HOST} /etc/os-release
2224 echo " a b c=d eee=fff K=L" > ${FAKE_HOST} /proc/cmdline
2325 touch ${FAKE_HOST} /run/ostree-booted
2426
@@ -31,6 +33,7 @@ test_RpmOstree_Add_Only_Missing_Arguments() {
3133}
3234
3335test_RpmOstree_Delete_All_Arguments () {
36+ echo " ID=\" rhel\" " > ${FAKE_HOST} /etc/os-release
3437 echo " a b c=d eee=fff X=Y W=Z" > ${FAKE_HOST} /proc/cmdline
3538 touch ${FAKE_HOST} /run/ostree-booted
3639
@@ -43,6 +46,7 @@ test_RpmOstree_Delete_All_Arguments() {
4346}
4447
4548test_RpmOstree_Delete_Only_Exist_Arguments () {
49+ echo " ID=\" rhel\" " > ${FAKE_HOST} /etc/os-release
4650 echo " a b c=d eee=fff X=Y" > ${FAKE_HOST} /proc/cmdline
4751 touch ${FAKE_HOST} /run/ostree-booted
4852
You can’t perform that action at this time.
0 commit comments