Prevent srfsh commands run from scripts going into history

Bug #1152272 reported by Pasi Kallinen
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
OpenSRF
Fix Released
Wishlist
Unassigned

Bug Description

srfsh scripts run from eg. cronjob put the commands in the user's .srfsh_history. Commands run via scripts should not do that.

Setting HISTSIZE=0 in crontab has no effect.

Tags: pullrequest
Galen Charlton (gmc)
Changed in opensrf:
status: New → Confirmed
Galen Charlton (gmc)
Changed in opensrf:
importance: Undecided → Wishlist
milestone: none → 2.4.1
Revision history for this message
Galen Charlton (gmc) wrote :

A patch is available at the tip of the user/gmcharlt/lp1152272_keep_batch_srfsh_out_of_history branch in the working/OpenSRF repository:

http://git.evergreen-ils.org/?p=working/OpenSRF.git;a=shortlog;h=refs/heads/user/gmcharlt/lp1152272_keep_batch_srfsh_out_of_history

Test plan:

    [1] Run the following command:

        echo 'request opensrf.math opensrf.system.echo "foo"' | srfsh

    [2] Note that the last line of ~/.srfsh_history should be
        'request opensrf.math opensrf.system.echo "foo"'

    [3] Apply the patch, compile, and run

        echo 'request opensrf.math opensrf.system.echo "bar"' | srfsh

    [4] This time, no additional line should have been added to
        ~/.srfsh_history

    [5] Another variation to try:

        srfsh test.srfsh

tags: added: pullrequest
Revision history for this message
Mike Rylander (mrylander) wrote :

Picked to master and 2.4 with signoff and thanks.

Changed in opensrf:
status: Confirmed → Fix Committed
Galen Charlton (gmc)
Changed in opensrf:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.