1

I have a Zmodo DVR that runs some kind of Linux-based OS and which (I think) has an ARM processor. I can place files in its filesystem using its updater tool, replacing anything with the same name, but I cannot read or execute any commands or access the DVR in any other way.

So where could I place some files that would make the machine run a shell script or something when it boots up?

Update: I know the path of its HTTP web root, but it apparently doesn't support PHP. I also see an executable file in an update for it that I'm guessing it runs at bootup. I would replace it with a shell script that runs some commands then runs the original executable, but I'm afraid to do that because if the shell script fails and prevents it from booting, my DVR is bricked forever.

P.S. This is not for malicious purposes. I'm trying to make this thing network-accessible.

2
  • This completely depends on the existing system. How do you know this is Linux based? There are dozens of different ways things may get launched on a Linux based system.
    – Zoredache
    Aug 11, 2014 at 3:44
  • The product is advertised as Linux-based. Also, I downloaded an update for it, and a few of the usual Linux (or BSD) directories like etc are in there. Unfortunately, that's all I know. I can try multiple things at once that might work, but I don't want to overwrite anything because one wrong move will brick the DVR for good.
    – sudo
    Aug 11, 2014 at 4:01

1 Answer 1

1

Traditionally you have file /etc/rc.local which looks like this:

#!/bin/sh -e
#
# rc.local - executed at the end of each multiuser runlevel
#
# Make sure that the script will "exit 0" on success or any other
# value on error.

It should be enough to add your shell script there

1
  • Haha, I don't even remember where that DVR is by now, but yes, I think this is the correct answer. Since I asked this, I have ben been kind of a sysadmin for some Linux and BSD servers, and I've edited that file before to run things on bootup.
    – sudo
    Mar 22, 2017 at 23:59

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .