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
1=== modified file 'bin/checkbox-ocp-cli'
2--- bin/checkbox-ocp-cli 2013-09-24 02:42:59 +0000
3+++ bin/checkbox-ocp-cli 2013-09-26 16:06:36 +0000
4@@ -6,7 +6,7 @@
5 export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
6 export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
7
8-if [ ! -s /etc/checkbox.d/configs ]
9+if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
10 then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
11 fi
12
13
14=== modified file 'bin/checkbox-ocp-gtk'
15--- bin/checkbox-ocp-gtk 2013-09-24 02:42:59 +0000
16+++ bin/checkbox-ocp-gtk 2013-09-26 16:06:36 +0000
17@@ -6,6 +6,10 @@
18 export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
19 export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
20
21+if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
22+then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
23+fi
24+
25 if [ $CHECKBOX_DATA != '.' ]
26 then
27 old_data=$HOME/.checkbox
28
29=== modified file 'bin/checkbox-ocp-qt'
30--- bin/checkbox-ocp-qt 2013-09-24 02:42:59 +0000
31+++ bin/checkbox-ocp-qt 2013-09-26 16:06:36 +0000
32@@ -1,14 +1,15 @@
33 #!/bin/bash
34
35-set -e
36-
37 export XDG_CACHE_HOME=${XDG_CACHE_HOME:-$HOME/.cache}
38 export CHECKBOX_DATA=${CHECKBOX_DATA:-.}
39 export CHECKBOX_SHARE=${CHECKBOX_SHARE:-.}
40-export CHECKBOX_FRONTEND=${CHECKBOX_FRONTEND:-$CHECKBOX_SHARE/qt/frontend}
41 export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
42 export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
43
44+if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
45+then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
46+fi
47+
48 if [ $CHECKBOX_DATA != '.' ]
49 then
50 old_data=$HOME/.checkbox
51@@ -18,9 +19,4 @@
52 fi
53 fi
54
55-if [ -e $CHECKBOX_FRONTEND ]
56-then
57- (cd $CHECKBOX_FRONTEND; qmake; make; ./checkbox-qt-service &)
58-fi
59-
60 python3 $CHECKBOX_SHARE/run "$@" $CHECKBOX_SHARE/configs/$(basename $0).ini
61
62=== modified file 'bin/checkbox-ocp-urwid'
63--- bin/checkbox-ocp-urwid 2013-09-24 02:42:59 +0000
64+++ bin/checkbox-ocp-urwid 2013-09-26 16:06:36 +0000
65@@ -6,6 +6,10 @@
66 export CHECKBOX_OPTIONS=${CHECKBOX_OPTIONS:---whitelist-file=$CHECKBOX_SHARE/data/whitelists/opencompute-ready-local.whitelist}
67 export PYTHONPATH=$PYTHONPATH:$CHECKBOX_SHARE
68
69+if ( grep -q "Ubuntu" /etc/issue ) && [ ! -L /etc/checkbox.d/configs ]
70+then ln -s /usr/share/checkbox/examples /etc/checkbox.d/configs
71+fi
72+
73 if [ $CHECKBOX_DATA != '.' ]
74 then
75 old_data=$HOME/.checkbox

Subscribers

People subscribed via source and target branches