H
HB
Hi All,
I'm looking to create a pretty simple script that will create the
system V run level links for custom chkconfig scripts on Linux. I was
thinking it will work with 4 arguments as:
../script <run levels on> <start order #> <kill order #> </etc/init.d/
scriptname>
If I'm thinking correctly, the best way to do this is put ARGV[0] into
a hash as: 0=off, 1=off, 2=off, 3=on, etc. I would use only the run
levels to be on in the argument such as:
../script 345 x x x
My question is on the checking of ARGV[0] and how to drop the info
into a hash. I.E. in the example above:
- make sure there are only numbers 0-6 used and max of 7
- if a number is not present it equals 'off'
- if a number is present it equals 'on'
- getting data into hash
I should be fine once I get this part squared away. Is this the best
way to go about setting this up and if so can someone help me out with
this hash?
Thank you very much in advance.
Best regards,
Herb
I'm looking to create a pretty simple script that will create the
system V run level links for custom chkconfig scripts on Linux. I was
thinking it will work with 4 arguments as:
../script <run levels on> <start order #> <kill order #> </etc/init.d/
scriptname>
If I'm thinking correctly, the best way to do this is put ARGV[0] into
a hash as: 0=off, 1=off, 2=off, 3=on, etc. I would use only the run
levels to be on in the argument such as:
../script 345 x x x
My question is on the checking of ARGV[0] and how to drop the info
into a hash. I.E. in the example above:
- make sure there are only numbers 0-6 used and max of 7
- if a number is not present it equals 'off'
- if a number is present it equals 'on'
- getting data into hash
I should be fine once I get this part squared away. Is this the best
way to go about setting this up and if so can someone help me out with
this hash?
Thank you very much in advance.
Best regards,
Herb