Ignore:
Timestamp:
May 1, 2012, 11:05:32 AM (13 years ago)
Author:
rick
Message:

Make sure to update the motd after file is downloaded to include the latest
version information.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/releng-9.0/nanobsd/files/tools/wl-config

    r10571 r10628  
    3434FILES="authorized_keys dhcpd.conf dnsmasq.conf motd rc.conf.local resolv.conf wleiden.yaml"
    3535file_details() {
     36  POST_CMD=""
     37  FILE_HINT=""
     38
    3639  case "$1" in
    3740  'authorized_keys')
    3841     STARTUP_LOC="/cfg/ssh/${FILE}"
    3942     RUNNING_LOC="/etc/ssh/${FILE}"
    40      FILE_HINT=""
    4143   ;;
    4244  'dhcpd.conf')
     
    5355     STARTUP_LOC="/cfg/${FILE}"
    5456     RUNNING_LOC="/etc/${FILE}"
    55      FILE_HINT=""
     57     POST_CMD="/etc/rc.d/motd onestart"
    5658   ;;
    5759  'named.conf')
     
    6870     STARTUP_LOC="/cfg/${FILE}"
    6971     RUNNING_LOC="/etc/${FILE}"
    70      FILE_HINT=""
    7172   ;;
    7273   'wleiden.yaml')
    7374     STARTUP_LOC="/cfg/local/${FILE}"
    7475     RUNNING_LOC="/etc/local/${FILE}"
    75      FILE_HINT=""
    7676   ;;
    7777  esac
     
    163163  fetch -q -o ${TMPDIR}/node_list.txt ${BASEURL} || exit 1
    164164 
    165   # Provide Nodelist and feedback
    166   cat ${TMPDIR}/node_list.txt | column
    167   echo '       THIS script adds the config from GENESIS to this operating system'
    168   echo '       make sure you know what you are doing, if not press control-C'
    169   echo '       ENTER CONFIG NAME  ......(and press enter)'
    170 
    171165  if [ ${OPT_BATCH} -eq 1 ]; then
    172166    config_validator "${CONFIG}"
     
    176170   fi
    177171  else
     172    # Provide Nodelist and feedback
     173    cat ${TMPDIR}/node_list.txt | column
     174    echo '       THIS script adds the config from GENESIS to this operating system'
     175    echo '       make sure you know what you are doing, if not press control-C'
     176    echo '       ENTER CONFIG NAME  ......(and press enter)'
     177
    178178    # Have the user to select the right node
    179179    INVALID_CONFIG=1
     
    203203  SOURCE=$1
    204204  TARGET=$2
    205   diff -I '^# Generated at ' ${TARGET} ${SOURCE} 2>/dev/null
     205  diff -I '^FreeBSD ' -I '^# Generated at ' ${TARGET} ${SOURCE} 2>/dev/null
    206206  if [ $? -ne 0 ]; then
    207207    mkdir -p `dirname ${TARGET}` || exit 1
     
    256256      if [ $? -eq 0 ]; then
    257257        echo "# INFO: '${FILE}' changed" 
     258        if [ -n "${POST_CMD}" ]; then
     259          echo "## Running post_cmd: $POST_CMD"
     260          $POST_CMD
     261        fi
    258262        if [ -n "${FILE_HINT}" ]; then
    259263          echo "# INFO: For instant activate: ${FILE_HINT}"
Note: See TracChangeset for help on using the changeset viewer.