- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hi,
Right now I'm working with MDS R77.10 and in the middle of creating mini script (pushpolicy.sh) to automate install policy via cli as per below example. (Currently not pushing via GUI because of timeout issue)
#!/bin/bash
mdsenv 172.16.1.1
fwm load POLICY_10082020 FW_CLUSTER0001and then chmod the script as well.
chmod +x pushpolicy.shBut when I execute the script, below error will come up.
[Expert@firewallmds01]#./pushpolicy.sh
./pushpolicy.sh: line 3: mdsenv: command not found
[Expert@firewallmds01]#From my reading, it may related to environment PATH, but still can't figure it out.
How can I overcome this issue? Or any better way to automate this process?
I just want to make this process easier to use by anyone in my team regardless of their linux knowledge.
Just add
source /etc/profile.d/CP.sh;
right after your #!/bin/bash header.
why not putting the absolute path? or, alternatively, use "# !/bin/sh" at the beginning 🙂
Thanks for the prompt reply.
Sorry but I'm still not familiar with mds cli environment. for this case, what is the absolute path for 'mdsenv <domain ip>'?
Tried the "# !/bin/sh" but no luck.
mdsenv is under $MDSDIR/bin/, which can be resolved to different actual paths, depending on the version.
Absolute paths are always a bad thing.
I had to cleanup too many messes because someone did put in a hard path that failed after an upgrade.
Just add
source /etc/profile.d/CP.sh;
right after your #!/bin/bash header.
This one works!
Thanks sir!
Thanks Danny.
It works perfectly!
Good catch, @Danny, did not think of that 🙄
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 4 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 | |
| 1 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY