Changeset 4988 in genesis


Ignore:
Timestamp:
Nov 2, 2005, 6:00:06 PM (19 years ago)
Author:
rick
Message:

Fixed diff functie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/config-node.sh

    r4987 r4988  
    6868                        ;;
    6969                -d)     
    70                         DO_CMD=do_diff
     70                        CMD=do_diff
    7171                        dir=${TMPDIR}
    7272                        ;;
     
    9595done
    9696
    97 echo Config Node -- Version: $VERSION '$Rev$'
    98 
    99 # Make sure we clean up our mess when needed.
    100 trap "rm -f ${TMPPREFIX}.?; echo Failed; exit 1;" 2 3
    101 
    102 if [ ${PRETEND} != 'yes' ]; then
    103         if mount | grep "on / " | grep -q read-only; then
    104                 if [ ${FORCE} = "yes" ]; then
    105                         echo Forcing read-only disk into rw.
    106                         fsck / || exit 2
    107                         mount -o noatime -u -w / || exit 2 || exit 1
    108                         trap "mount -u -r /; rm -f ${TMPPREFIX}.?; echo Failed; exit 1;" 2 3
    109                         FORCE=rw
    110                 else
    111                         echo ERROR - disk / is mounted read only. Aborting.
    112                         exit 1
    113                 fi
    114         fi
    115 fi
    116 
    117 export HTTP_USER_AGENT
    118 export TMPDIR
    11997
    12098
     
    291269}
    292270
     271log Config Node -- Version: $VERSION '$Rev$'
     272
     273# Make sure we clean up our mess when needed.
     274trap "rm -f ${TMPPREFIX}.?; echo Failed; exit 1;" 2 3
     275
     276if [ ${PRETEND} != 'yes' ]; then
     277        if mount | grep "on / " | grep -q read-only; then
     278                if [ ${FORCE} = "yes" ]; then
     279                        echo Forcing read-only disk into rw.
     280                        fsck / || exit 2
     281                        mount -o noatime -u -w / || exit 2 || exit 1
     282                        trap "mount -u -r /; rm -f ${TMPPREFIX}.?; echo Failed; exit 1;" 2 3
     283                        FORCE=rw
     284                else
     285                        echo ERROR - disk / is mounted read only. Aborting.
     286                        exit 1
     287                fi
     288        fi
     289fi
     290
     291export HTTP_USER_AGENT
     292export TMPDIR
    293293
    294294
     
    310310fi
    311311
    312 
    313312if [ -r ${lcd}/myname ]; then
    314313    default=`cat ${lcd}/myname`
     
    316315    default=`hostname -s`
    317316    test -z $default && default=none
     317fi
     318
     319if [ ! -z ${QUIET} -a -z ${nodename} ]; then
     320        nodename=${default}
    318321fi
    319322
Note: See TracChangeset for help on using the changeset viewer.