Opened 9 years ago

Closed 8 years ago

#5 closed enhancement (fixed)

rpm: allow modification of config.sys

Reported by: ydario Owned by: ydario
Priority: major Milestone:
Component: rpm Version:
Severity: Keywords:
Cc:

Description

RPM requires a new post install hook to accept a modification string for config.sys. Again, rexx should work.

Change History (2)

comment:1 Changed 8 years ago by ydario

2010-10-29 changeset:70 rpm: hide cube.cmd execution in scripts.

2010-11-08 changeset:90 rpm: fixes cube macro now that sh is used for it.

comment:2 Changed 8 years ago by ydario

  • Resolution set to fixed
  • Status changed from new to closed

New macros added:

#------------------------------------------------------------------------
# OS/2 macros to handle config.sys changes (using cube script)
#
%os2_boot_drive			%{_os2_boot_drive}
%os2_unixroot_drive		%{_os2_unixroot_drive}
%os2_config_sys			%{os2_boot_drive}\\config.sys
%cube() 			cmd /c '%UNIXROOT%\\usr\\bin\\cube.exe %{*}'\
%{nil}

Sample usage (adding and removing) from os2-base.spec:

%post
if [ "$1" = 1 ] ; then
#execute only on first install
%cube {ADDSTRING "%UNIXROOT%\usr\sbin;%UNIXROOT%\usr\bin;" IN "SET PATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys c:\config.sys.yum > NUL
%cube {ADDSTRING "%UNIXROOT%\usr\lib;" IN "LIBPATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
%cube {DELLINE "SET UNIXROOT="} c:\config.sys > NUL
%cube {ADDLINE "SET UNIXROOT=%UNIXROOT%"} c:\config.sys > NUL
fi

%postun
if [ "$1" = 0 ] ; then
#execute only on last uninstall
%cube {DELSTRING "%UNIXROOT%\usr\sbin;%UNIXROOT%\usr\bin;" IN "SET PATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
%cube {DELSTRING "%UNIXROOT%\usr\lib;" IN "LIBPATH=" (FIRST IFNEW BEFORE RS(%%)} c:\config.sys > NUL
%cube {DELLINE "SET UNIXROOT="} c:\config.sys > NUL
fi

Note: See TracTickets for help on using tickets.