Trigger a prompt when any user runs a specific command

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
1
down vote

favorite












Working on Oracle Linux version 5.11 (unable to upgrade due to limitations around the software on this server.



There is a specific command for our Veritas Cluster Service that should not be impacting but when our cluster isn't frozen it has been known to cause failovers.



The command in question is vxconfigd.



I'm looking for a way to trigger a query anytime any user runs vxconfigd that holds on running the command and first presents a yes/no question to ask if the cluster resources are frozen.



If it was an in house execute I would just modify the script itself but since it's vendor I don't want to modify it directly. Which is why I'm looking for something OS level that will do the same.



The only thing I can think of is something with aliasing but that's not very elegant so I'm wondering what other options I have.










share|improve this question

























    up vote
    1
    down vote

    favorite












    Working on Oracle Linux version 5.11 (unable to upgrade due to limitations around the software on this server.



    There is a specific command for our Veritas Cluster Service that should not be impacting but when our cluster isn't frozen it has been known to cause failovers.



    The command in question is vxconfigd.



    I'm looking for a way to trigger a query anytime any user runs vxconfigd that holds on running the command and first presents a yes/no question to ask if the cluster resources are frozen.



    If it was an in house execute I would just modify the script itself but since it's vendor I don't want to modify it directly. Which is why I'm looking for something OS level that will do the same.



    The only thing I can think of is something with aliasing but that's not very elegant so I'm wondering what other options I have.










    share|improve this question























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      Working on Oracle Linux version 5.11 (unable to upgrade due to limitations around the software on this server.



      There is a specific command for our Veritas Cluster Service that should not be impacting but when our cluster isn't frozen it has been known to cause failovers.



      The command in question is vxconfigd.



      I'm looking for a way to trigger a query anytime any user runs vxconfigd that holds on running the command and first presents a yes/no question to ask if the cluster resources are frozen.



      If it was an in house execute I would just modify the script itself but since it's vendor I don't want to modify it directly. Which is why I'm looking for something OS level that will do the same.



      The only thing I can think of is something with aliasing but that's not very elegant so I'm wondering what other options I have.










      share|improve this question













      Working on Oracle Linux version 5.11 (unable to upgrade due to limitations around the software on this server.



      There is a specific command for our Veritas Cluster Service that should not be impacting but when our cluster isn't frozen it has been known to cause failovers.



      The command in question is vxconfigd.



      I'm looking for a way to trigger a query anytime any user runs vxconfigd that holds on running the command and first presents a yes/no question to ask if the cluster resources are frozen.



      If it was an in house execute I would just modify the script itself but since it's vendor I don't want to modify it directly. Which is why I'm looking for something OS level that will do the same.



      The only thing I can think of is something with aliasing but that's not very elegant so I'm wondering what other options I have.







      rhel oracle-linux






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Aug 16 at 17:37









      StrawDog

      61




      61




















          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          Move vxconfigd to real-vxconfigd.



          Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.






          share|improve this answer




















          • Potentially, the script could check if resources were frozen without prompting the user.
            – BowlOfRed
            Aug 16 at 18:05










          • There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
            – StrawDog
            Aug 17 at 19:19










          • I could just do some aliasing to call the other script instead though...
            – StrawDog
            Aug 17 at 19:19










          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463029%2ftrigger-a-prompt-when-any-user-runs-a-specific-command%23new-answer', 'question_page');

          );

          Post as a guest






























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          Move vxconfigd to real-vxconfigd.



          Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.






          share|improve this answer




















          • Potentially, the script could check if resources were frozen without prompting the user.
            – BowlOfRed
            Aug 16 at 18:05










          • There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
            – StrawDog
            Aug 17 at 19:19










          • I could just do some aliasing to call the other script instead though...
            – StrawDog
            Aug 17 at 19:19














          up vote
          2
          down vote













          Move vxconfigd to real-vxconfigd.



          Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.






          share|improve this answer




















          • Potentially, the script could check if resources were frozen without prompting the user.
            – BowlOfRed
            Aug 16 at 18:05










          • There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
            – StrawDog
            Aug 17 at 19:19










          • I could just do some aliasing to call the other script instead though...
            – StrawDog
            Aug 17 at 19:19












          up vote
          2
          down vote










          up vote
          2
          down vote









          Move vxconfigd to real-vxconfigd.



          Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.






          share|improve this answer












          Move vxconfigd to real-vxconfigd.



          Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Aug 16 at 18:00









          RalfFriedl

          3,7001523




          3,7001523











          • Potentially, the script could check if resources were frozen without prompting the user.
            – BowlOfRed
            Aug 16 at 18:05










          • There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
            – StrawDog
            Aug 17 at 19:19










          • I could just do some aliasing to call the other script instead though...
            – StrawDog
            Aug 17 at 19:19
















          • Potentially, the script could check if resources were frozen without prompting the user.
            – BowlOfRed
            Aug 16 at 18:05










          • There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
            – StrawDog
            Aug 17 at 19:19










          • I could just do some aliasing to call the other script instead though...
            – StrawDog
            Aug 17 at 19:19















          Potentially, the script could check if resources were frozen without prompting the user.
          – BowlOfRed
          Aug 16 at 18:05




          Potentially, the script could check if resources were frozen without prompting the user.
          – BowlOfRed
          Aug 16 at 18:05












          There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
          – StrawDog
          Aug 17 at 19:19




          There's a thought... I'll look into whether or not our future patching will cause issues with renaming the script.
          – StrawDog
          Aug 17 at 19:19












          I could just do some aliasing to call the other script instead though...
          – StrawDog
          Aug 17 at 19:19




          I could just do some aliasing to call the other script instead though...
          – StrawDog
          Aug 17 at 19:19

















           

          draft saved


          draft discarded















































           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f463029%2ftrigger-a-prompt-when-any-user-runs-a-specific-command%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          Peggy Mitchell

          Palaiologos

          The Forum (Inglewood, California)