Changeset 3325

Show
Ignore:
Timestamp:
01/02/10 14:35:13 (10 years ago)
Author:
zackrb
Message:

Added a value to trunk/dist/nodeman.cfg so the start_seattle script can tell whether or not seattle is installed. If not, then start_seattle will produce an error message and ask the user to install before seattle can be started. See ticket #724

Location:
seattle/trunk/dist
Files:
6 modified

Legend:

Unmodified
Added
Removed
  • seattle/trunk/dist/linux/scripts/start_seattle.sh

    r3322 r3325  
    55cd "`echo $0 | sed 's/start_seattle.sh//'`" 
    66 
    7  
    8 python nmmain.py & 
    9 python softwareupdater.py & 
     7if grep "'seattle_installed': True" nodeman.cfg > /dev/null 
     8then 
     9    python nmmain.py & 
     10    python softwareupdater.py & 
     11else 
     12    echo "seattle must first be installed before the start_seattle.sh script" \ 
     13        "can be run.  To install, run the install.sh script." 
     14fi 
    1015 
    1116 
    12 # Check to confirm that nmmain.py and softwareupdater.py are running, and print 
     17# Check to confirm that nmmain.py and softwareupdater.py are running, and echo 
    1318#   the status to the user. 
    14 # Some systems respond different to some options passed to 'ps', so we use 
    15 #   'ps auxww' to create a universal command that will tell us if nmmain.py 
     19# Some systems respond differently to some options passed to 'ps', so we use 
     20#   'ps axww' to create a universal command that will tell us if nmmain.py 
    1621#   is currently running. 
    1722# 
     
    3338else 
    3439    echo "seattle was not properly started." 
    35     echo "If you continue to see this error, please contact the seattle" \ 
    36         "development team." 
     40    echo "If you continue to see this error for unknown reasons, please" \ 
     41        "contact the seattle development team." 
    3742fi 
  • seattle/trunk/dist/mac/scripts/start_seattle.sh

    r3322 r3325  
    66 
    77 
    8 python nmmain.py & 
    9 python softwareupdater.py & 
     8if grep "'seattle_installed': True" nodeman.cfg > /dev/null 
     9then 
     10    python nmmain.py & 
     11    python softwareupdater.py & 
     12else 
     13    echo "seattle must first be installed before the start_seattle.sh script" \ 
     14        "can be run.  To install, run the install.sh script." 
     15fi 
    1016 
    1117 
  • seattle/trunk/dist/nodeman.cfg

    r3259 r3325  
    1 {'crontab_updated_for_2009_installer': False, 'ports': [1224, 2888, 9625, 10348, 39303, 48126, 52862, 57344, 64310], 'pollfrequency': 1.0, 'service_vessel':'v2'} 
     1{'seattle_installed': False, 'crontab_updated_for_2009_installer': False, 'ports': [1224, 2888, 9625, 10348, 39303, 48126, 52862, 57344, 64310], 'pollfrequency': 1.0, 'service_vessel':'v2'} 
  • seattle/trunk/dist/seattleinstaller.py

    r3270 r3325  
    19701970 
    19711971 
     1972  # Modify nodeman.cfg so the start_seattle script knows that seattle has been 
     1973  # installed.  This is a new feature that will require seattle to have been 
     1974  # installed before it can be started. 
     1975  configuration = persist.restore_object("nodeman.cfg") 
     1976  configuration['seattle_installed'] = True 
     1977  persist.commit_object(configuration,"nodeman.cfg") 
     1978 
     1979   
     1980 
    19721981 
    19731982  # Everything has been installed, so start seattle and print concluding output 
  • seattle/trunk/dist/seattleuninstaller.py

    r3322 r3325  
    522522  # Print final output, and do final logging. 
    523523  if successful_uninstall: 
     524    # Modify nodeman.cfg to note that seattle is no longer installed. 
     525    configuration = persist.restore_object("nodeman.cfg") 
     526    configuration['seattle_installed'] = False 
     527    persist.commit_object(configuration,"nodeman.cfg") 
     528 
    524529    _output("Seattle has been successfully uninstalled.  It is now safe to " \ 
    525530              + "remove all Seattle files and directories from your system.") 
  • seattle/trunk/dist/win/scripts/start_seattle.bat

    r3322 r3325  
    66cd %TargetDir% 
    77 
     8set seattle_config_file_found=not 
     9FOR /F %%C IN ('findstr /M "seattle_installed: True" nodeman.cfg') DO SET seattle_config_file_found=%%C 
     10 
     11IF "%seattle_config_file_found%"=="nodeman.cfg" goto START_SEATTLE_NOW 
     12echo."Seattle has not yet been installed. Before seattle can be started, be sure to double click the install.bat file." 
     13goto FINISH 
     14 
     15:START_SEATTLE_NOW 
    816start /min pythonw.exe nmmain.py 
    917start /min pythonw.exe softwareupdater.py 
     18goto FINISH 
    1019 
     20:FINISH 
    1121REM Go back up to the seattle directory. 
    1222cd ..