Trigger a prompt when any user runs a specific command

Clash 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.
rhel oracle-linux
add a comment |Â
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.
rhel oracle-linux
add a comment |Â
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.
rhel oracle-linux
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
rhel oracle-linux
asked Aug 16 at 17:37
StrawDog
61
61
add a comment |Â
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
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
add a comment |Â
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.
Move vxconfigd to real-vxconfigd.
Create a script vxconfigd that asks whether to run the program and then execs real-vxconfigd.
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
add a comment |Â
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
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
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
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password