Changeset 10722 in hybrid


Ignore:
Timestamp:
May 8, 2012, 5:36:48 PM (13 years ago)
Author:
rick
Message:

During image building config do not run the POST_CMD commands.

Running and running them in chroot highly confuses the system.

Location:
branches/releng-9.0/nanobsd
Files:
2 edited

Legend:

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

    r10704 r10722  
    8888        echo "  -b          = batch mode, no user input"
    8989        echo "  -c <config> = default configuration to fetch"
     90        echo "  -d          = do not run the POST_CMD commands"
    9091        echo "  -n          = do not mount config partition"
    9192        echo "  -m all      = copy config files to running & config partition [default]"
     
    105106OPT_HACK=0              # Hack for people without configuration managment and testing
    106107OPT_BATCH=0
     108OPT_POSTCMD=true
    107109
    108110parse_options() {
    109   while getopts "bc:nm:" OPT; do
     111  while getopts "bc:nm:d" OPT; do
    110112        case "$OPT" in
    111113        b) OPT_BATCH=1;;
    112114        c) CONFIG="${OPTARG}";;
     115        d) OPT_POSTCMD=false;;
    113116        n) OPT_MOUNT=0;;
    114117        m) case "$OPTARG" in
     
    261264      if [ $? -eq 0 ]; then
    262265        echo "# INFO: '${FILE}' changed" 
    263         if [ -n "${POST_CMD}" ]; then
     266        if $OPT_POSTCMD && [ -n "${POST_CMD}" ]; then
    264267          echo "## Running post_cmd: $POST_CMD"
    265268          $POST_CMD
  • branches/releng-9.0/nanobsd/tools/config-image.sh

    r10721 r10722  
    4242
    4343# Try to fetch and store config
    44 chroot ${MNT} /tools/wl-config -n -m startup
     44chroot ${MNT} /tools/wl-config -d -n -m startup
    4545
    4646# Clean up
Note: See TracChangeset for help on using the changeset viewer.