Skip to content

Commit

Permalink
Merge branch 'master' of github.com:StackIQ/stacki
Browse files Browse the repository at this point in the history
Conflicts:
	src/stack/command/stack/commands/list/host/profile/__init__.py
	src/stack/command/stack/commands/list/host/profile/imp_redhat.py
	src/stack/command/stack/commands/list/node/xml/__init__.py
	src/stack/command/stack/commands/report/host/interface/__init__.py
	src/stack/command/stack/commands/report/host/resolv/__init__.py
	src/stack/command/stack/commands/set/host/boot/__init__.py
  • Loading branch information
masonkatz committed Dec 13, 2016
2 parents 03cc37f + cb68885 commit 29635f4
Show file tree
Hide file tree
Showing 40 changed files with 1,562 additions and 742 deletions.
1 change: 0 additions & 1 deletion manifest
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ lighttpd
MegaCLI
netaddr
stack-admin
stack-barnacle
stack-build
stack-command
stack-config
Expand Down
41 changes: 0 additions & 41 deletions nodes/networking-client.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,47 +19,6 @@ All rights reserved. Rocks(r) v5.4 www.rocksclusters.org

<post>

<eval shell="/opt/stack/bin/python">
import os
import re

ifaces = []
macs = []
modules = []
flags = []

for i in os.environ:
if re.match('HTTP_X_RHN_PROVISIONING_MAC_[0-9]+', i):
devinfo = os.environ[i].split()
iface = devinfo[0]
macaddr = devinfo[1].lower()
module = ''
if len(devinfo) > 2:
module = devinfo[2]

ks = ''
if len(devinfo) > 3:
ks = 'ks'

ifaces.append(iface)
macs.append(macaddr)
modules.append(module)
flags.append(ks)

params = None
if len(ifaces) > 0 and len(macs) > 0:
params = 'interface="%s" mac="%s"' % (','.join(ifaces), ','.join(macs))

if len(modules) > 0:
params += ' module="%s"' % (','.join(modules))
if len(flags) > 0:
params += ' flag="%s"' % (','.join(flags))

os.system('/opt/stack/bin/stack config host interface &hostname; ' +
'%s' % params)

</eval>

<report name="host.network">&hostname;</report>
<report name="host.interface">&hostname;</report>

Expand Down
5 changes: 5 additions & 0 deletions src/stack/build/build/bin/distribution
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,16 @@ fi
##
## insert SuSe detection here
##
if [ -f /etc/SuSE-release ]; then
DIST=`head -1 /etc/SuSE-release | awk '{print $1;}'`

case $DIST in
CentOS|Red|Scientific)
echo centos
;;
SUSE)
echo sles
;;
*)
echo unknown
;;
Expand Down
2 changes: 2 additions & 0 deletions src/stack/build/build/bin/os
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,8 @@ case $OS in
Linux)
if [ -f /etc/redhat-release ]; then
echo redhat
elif [ -f /etc/SuSE-release ]; then
echo suse
else
echo linux
fi
Expand Down
14 changes: 13 additions & 1 deletion src/stack/build/build/bin/redhat-release
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,13 @@
# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
# @SI_Copyright@

RELEASE=`cat /etc/redhat-release`
if [ -f /etc/redhat-release ]; then
RELEASE=`cat /etc/redhat-release`
elif [ -f /etc/SuSE-release ]; then
RELEASE=`head -1 /etc/SuSE-release`
else
RELEASE='unknown'
fi

case $RELEASE in
*6.*)
Expand All @@ -50,6 +56,12 @@ case $RELEASE in
*7.*)
echo 7.x
;;
*SUSE*11*)
echo sles11
;;
*SUSE*12*)
echo sles12
;;
*)
echo unknown
;;
Expand Down
12 changes: 11 additions & 1 deletion src/stack/build/build/etc/CCCommon.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,17 @@ __CCCOMMON_MK = yes
##

-include $(ROLLROOT)/version.mk
STACK ?= $(shell git branch | fgrep '*' | awk '{ print $$2; }' | tr / _ | tr - _)
# try a little harder to get a symbolic reference out of git:
# print the first of the following:
# symbolic-ref of HEAD on current branch (basically the branch name; most common)
# a tag name associated with current commit (detached head state)
# the abbreviated tag (detached head, no tag)
# empty string (this isn't a git repo)
STACK ?= $(shell echo \
`git symbolic-ref -q --short HEAD 2>/dev/null || \
git describe --tags --exact-match 2>/dev/null || \
git rev-parse --short HEAD 2>/dev/null` | \
tr / _ | tr - _)
RELEASE ?= $(STACK)

##
Expand Down
Loading

0 comments on commit 29635f4

Please sign in to comment.