I just made a script to backup my files at shutdown and added it to init.d then linked it to rc6.d and I gave it the prefix or runlevel of "K01myscript".

The question is, will it cause any problem with my system? I have been testing it and it was working, I am just not sure if it will do some damage to the system in the long run.


In essence: its ok, it will work as you want, specially if you are giving it such a high priority.

But the correct procedure for that would be to create a script in /etc/init.d with the correct structure (look for the scripts inside that directory for examples) and issue the command sudo update-rc.d foo_script.

It will then create links to your script in the specified priority written in the script while maintaining the necessary other services for your script to run. But since your script has a very high run priority and no other services necessary should down up by then you do not need to worry about that.

What you did was just a short cut for what happens using that procedure and it should be fine.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.