Commit 31c9e5a7 by Heechul Kim

* Added installed call in savelog.LAST.sh

* Added PORCH_URL in setup.DEFAULT.sh
* Added selinux disabled
* Modified dynamically get PORCH_URL
parent 29e81f0e
...@@ -6,14 +6,18 @@ ...@@ -6,14 +6,18 @@
[ "$flag_menu" ] && exit 0 [ "$flag_menu" ] && exit 0
# use a list of classes for our demo machine # use a list of classes for our demo machine
#OS=$(/usr/bin/curl http://porch/porch/$HOSTNAME/faiclass/) if [ ! -n "$PORCH_URL" ]
OS=$(/usr/bin/curl http://porch:8000/api/fai/class/$HOSTNAME) then
echo "PORCH_URL is not set. Let's set it."
PORCH_URL=$(echo $FAI_CONFIG_SRC |cut -d'/' -f1,2,3)a
fi
OS=$(/usr/bin/curl $PORCH_URL/api/fai/class/$HOSTNAME)
case $OS in case $OS in
faiserver) faiserver)
echo "FAIBASE DEBIAN DEMO FAISERVER" ;; echo "FAIBASE DEBIAN DEMO FAISERVER" ;;
CENTOS7) CENTOS7)
echo "FAIBASE CENTOS" # you may want to add class XORG here echo "FAIBASE CENTOS DEMO" # you may want to add class XORG here
ifclass AMD64 && echo CENTOS7_64 ifclass AMD64 && echo CENTOS7_64
echo PORCH echo PORCH
exit 0 ;; # CentOS does not use the GRUB class exit 0 ;; # CentOS does not use the GRUB class
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
# enforcing - SELinux security policy is enforced. # enforcing - SELinux security policy is enforced.
# permissive - SELinux prints warnings instead of enforcing. # permissive - SELinux prints warnings instead of enforcing.
# disabled - No SELinux policy is loaded. # disabled - No SELinux policy is loaded.
SELINUX=enforcing SELINUX=disabled
# SELINUXTYPE= can take one of these two values: # SELINUXTYPE= can take one of these two values:
# targeted - Only targeted network daemons are protected. # targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection. # strict - Full SELinux protection.
......
...@@ -169,8 +169,12 @@ ignorepatterns="$globalignorepatterns ...@@ -169,8 +169,12 @@ ignorepatterns="$globalignorepatterns
$myignorepatterns" $myignorepatterns"
# set is_installed to True and state to 'Installed'. # set is_installed to True and state to 'Installed'.
/usr/bin/curl -XPOST http://porch:8000/api/machine/$HOSTNAME/installed if [ ! -n "$PORCH_URL" ]
then
echo "PORCH_URL is not set. Let's set it."
PORCH_URL=$(echo $FAI_CONFIG_SRC |cut -d'/' -f1,2,3)a
fi
/usr/bin/curl -XPOST $PORCH_URL/api/machine/$HOSTNAME/installed
cd $LOGDIR || exit 3 cd $LOGDIR || exit 3
if [ -s $errfile ]; then if [ -s $errfile ]; then
......
...@@ -9,3 +9,5 @@ if [ "$action" = "dirinstall" ] ; then ...@@ -9,3 +9,5 @@ if [ "$action" = "dirinstall" ] ; then
else else
echo $HOSTNAME > /proc/sys/kernel/hostname echo $HOSTNAME > /proc/sys/kernel/hostname
fi fi
export PORCH_URL=$(echo $FAI_CONFIG_SRC |cut -d'/' -f1,2,3)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment