Merge lp:~jeffmarcom/opencompute/symlink-bug-fix-1230365 into lp:opencompute/checkbox

Proposed by Jeff Marcom
Status: Merged
Approved by: Jeff Lane 
Approved revision: 2153
Merged at revision: 2155
Proposed branch: lp:~jeffmarcom/opencompute/symlink-bug-fix-1230365
Merge into: lp:opencompute/checkbox
Diff against target: 75 lines (+13/-9)
4 files modified
bin/checkbox-ocp-cli (+1/-1)
bin/checkbox-ocp-gtk (+4/-0)
bin/checkbox-ocp-qt (+4/-8)
bin/checkbox-ocp-urwid (+4/-0)
To merge this branch: bzr merge lp:~jeffmarcom/opencompute/symlink-bug-fix-1230365
Reviewer Review Type Date Requested Status
Jeff Lane  Approve
Review via email: mp+187560@code.launchpad.net

Commit message

Added a simple check to bypass the symlink creation in an Ubuntu based release.

Description of the change

The symlink only needs to be created in a Centos environment,

This adds a simple check to bypass the symlink creation in an Ubuntu based release.

To post a comment you must log in.
Revision history for this message
Jeff Lane  (bladernr) wrote :

Not sure if you care about this or not (functionally it works either way) but

grep -q "Ubuntu" /etc/issue
if [ $? -ne 0 ] && [ ! -L /etc/checkbox.d/configs ]

Can be expressed:
if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]

As long as you're fine with it as is, I'll approve it, but I thought I'd at least make the comment

review: Needs Information
2153. By Jeff Marcom

Updated symlink condition expression based on feedback

Signed-off-by: Jeff Marcom <email address hidden>

Revision history for this message
Jeff Marcom (jeffmarcom) wrote :

> Not sure if you care about this or not (functionally it works either way) but
>
> grep -q "Ubuntu" /etc/issue
> if [ $? -ne 0 ] && [ ! -L /etc/checkbox.d/configs ]
>
> Can be expressed:
> if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
>
> As long as you're fine with it as is, I'll approve it, but I thought I'd at
> least make the comment

Totally! Thanks

Revision history for this message
Jeff Lane  (bladernr) wrote :

approve.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'bin/checkbox-ocp-cli'
--- bin/checkbox-ocp-cli 2013-09-24 02:42:59 +0000
+++ bin/checkbox-ocp-cli 2013-09-26 16:06:36 +0000
@@ -6,7 +6,7 @@
6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
88
9if [ ! -s /etc/checkbox.d/configs ]9if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
10then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs10then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
11fi11fi
1212
1313
=== modified file 'bin/checkbox-ocp-gtk'
--- bin/checkbox-ocp-gtk 2013-09-24 02:42:59 +0000
+++ bin/checkbox-ocp-gtk 2013-09-26 16:06:36 +0000
@@ -6,6 +6,10 @@
6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
88
9if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
10then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
11fi
12
9if [ $CHECKBOX_DATA != '.' ]13if [ $CHECKBOX_DATA != '.' ]
10then14then
11 old_data=$HOME/.checkbox15 old_data=$HOME/.checkbox
1216
=== modified file 'bin/checkbox-ocp-qt'
--- bin/checkbox-ocp-qt 2013-09-24 02:42:59 +0000
+++ bin/checkbox-ocp-qt 2013-09-26 16:06:36 +0000
@@ -1,14 +1,15 @@
1#!/bin/bash1#!/bin/bash
22
3set -e
4
5export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}3export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
6export CHECKBOX_DATA=${CHECKBOX_DATA:-.}4export CHECKBOX_DATA=${CHECKBOX_DATA:-.}
7export CHECKBOX_SHARE=${CHECKBOX_SHARE:-.}5export CHECKBOX_SHARE=${CHECKBOX_SHARE:-.}
8export CHECKBOX_FRONTEND=${CHECKBOX_FRONTEND:-$CHECKBOX_SHARE/qt/frontend}
9export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
10export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
118
9if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
10then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
11fi
12
12if [ $CHECKBOX_DATA != '.' ]13if [ $CHECKBOX_DATA != '.' ]
13then14then
14 old_data=$HOME/.checkbox15 old_data=$HOME/.checkbox
@@ -18,9 +19,4 @@
18 fi19 fi
19fi20fi
2021
21if [ -e $CHECKBOX_FRONTEND ]
22then
23 (cd $CHECKBOX_FRONTEND; qmake; make; ./checkbox-qt-service &)
24fi
25
26python3 $CHECKBOX_SHARE/run "$@" $CHECKBOX_SHARE/configs/$(basename $0).ini22python3 $CHECKBOX_SHARE/run "$@" $CHECKBOX_SHARE/configs/$(basename $0).ini
2723
=== modified file 'bin/checkbox-ocp-urwid'
--- bin/checkbox-ocp-urwid 2013-09-24 02:42:59 +0000
+++ bin/checkbox-ocp-urwid 2013-09-26 16:06:36 +0000
@@ -6,6 +6,10 @@
6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}6export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE7export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
88
9if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
10then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
11fi
12
9if [ $CHECKBOX_DATA != '.' ]13if [ $CHECKBOX_DATA != '.' ]
10then14then
11 old_data=$HOME/.checkbox15 old_data=$HOME/.checkbox

Subscribers

People subscribed via source and target branches