[BACK]Return to install.sxxu CVS log [TXT][DIR] Up to [local] / openbsd / sxxu

Diff for /openbsd/sxxu/Attic/install.sxxu between version 1.16 and 1.20

version 1.16, 2010/04/23 00:01:30 version 1.20, 2013/04/20 22:36:26
Line 20 
Line 20 
   
 BASEDIR=/var/siteXX  BASEDIR=/var/siteXX
 useradd_args="-m -gid =uid"  useradd_args="-m -gid =uid"
 [ -e /var/siteXX/siteXXrc ] && . /var/siteXX/siteXXrc  [ -e $BASEDIR/siteXXrc ] && . $BASEDIR/siteXXrc
   
 export PKG_PATH  export PKG_PATH
   
Line 32 
Line 32 
     echo 'See /var/log/install.log for install messages.'      echo 'See /var/log/install.log for install messages.'
 }  }
   
 # Strip comments (and leading/trailing whitespace if IFS is set)  
 # from a file and spew to stdout  
 stripcom() {  
     local _file="$1"  
     local _line  
   
     {  
         while read _line ; do  
             _line=${_line%%#*}              # strip comments  
             test -z "$_line" && continue  
             echo $_line  
         done  
     } < $_file  
 }  
   
   
 process_roles() {  process_roles() {
     local _oldpwd="${PWD}"      local _oldpwd="${PWD}"
   
Line 61 
Line 45 
     unset _roles      unset _roles
     set -A _roles      set -A _roles
     local _role      local _role
     stripcom roles | while read _role; do      while read _role; do
     if [ -n "${_role}" ]; then      if [ -n "${_role}" ]; then
               _role=${_role%%#*}              # strip comments
               test -z "$_role" && continue
             _roles[${#_roles[@]}]="$_role"              _roles[${#_roles[@]}]="$_role"
     fi      fi
     done      done < roles
   
     for _role in "${_roles[@]}"; do      for _role in "${_roles[@]}"; do
         apply_role "$_role"          apply_role "$_role"
Line 76 
Line 62 
   
   
 append_pkg_path() {  append_pkg_path() {
     [ ! -e pkg_path ] && return      [ -e pkg_path -o -d packages ] || return
   
     echo ' ==> Setting PKG_PATH'      echo ' ==> Setting PKG_PATH'
       [ -d packages ] && PKG_PATH="${PKG_PATH}:${PWD}/packages"
       [ -e pkg_path ] || return;
     local _line      local _line
     stripcom pkg_path | while read _line; do      while read _line; do
         if [ -z "${PKG_PATH}" ]; then          _line=${_line%%#*}              # strip comments
             PKG_PATH="$_line"          [ -z "$_line" ] && continue
         else          PKG_PATH="${PKG_PATH}:${_line}"
             PKG_PATH="${PKG_PATH}:${_line}"      done < pkg_path
         fi  
     done  
   
     PKG_PATH=`eval echo $PKG_PATH`      PKG_PATH=`eval echo $PKG_PATH | sed -e 's/^:*//'`
 }  }
   
 run_command_lists() {  run_command_lists() {
Line 101 
Line 87 
   
         echo " ==> Running $_cmd $_args"          echo " ==> Running $_cmd $_args"
         local _line          local _line
         stripcom "${_f}" | while read _line; do          while read _line; do
               _line=${_line%%#*}              # strip comments
               test -z "$_line" && continue
             echo "  => ${_cmd} ${_args} ${_line}"              echo "  => ${_cmd} ${_args} ${_line}"
             eval ${_cmd} ${_args} ${_line}              eval ${_cmd} ${_args} ${_line}
         done          done < "${_f}"
     done      done
 }  }
   

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.20

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>