Ignore:
Timestamp:
Nov 26, 2010, 7:27:12 PM (15 years ago)
Author:
Yuri Dario
Message:

spec: os2-base scriptlets must take account of number of installations before modifying config.sys.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spec/trunk/SPECS/os2-base.spec

    r101 r115  
    33Name: os2-base
    44Version: 0.0.0
    5 Release: 1
     5Release: 2%{?dist}
    66
    77License: free
     
    260260
    261261%post
     262if [ "$1" = 1 ] ; then
     263#execute only on first install
    262264%cube {ADDSTRING "%UNIXROOT%\usr\sbin;%UNIXROOT%\usr\bin;%UNIXROOT%\sbin;%UNIXROOT%\bin;" IN "SET PATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys c:\config.sys.yum > NUL
    263265%cube {ADDSTRING "%UNIXROOT%\usr\lib;" IN "LIBPATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
    264266%cube {DELLINE "SET UNIXROOT="} c:\config.sys > NUL
    265267%cube {ADDLINE "SET UNIXROOT=%UNIXROOT%"} c:\config.sys > NUL
     268fi
    266269
    267270%postun
     271if [ "$1" = 0 ] ; then
     272#execute only on last uninstall
    268273%cube {DELSTRING "%UNIXROOT%\usr\sbin;%UNIXROOT%\usr\bin;%UNIXROOT%\sbin;%UNIXROOT%\bin;" IN "SET PATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
    269274%cube {DELSTRING "%UNIXROOT%\usr\lib;" IN "LIBPATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
    270275%cube {DELLINE "SET UNIXROOT="} c:\config.sys > NUL
     276fi
Note: See TracChangeset for help on using the changeset viewer.