DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2009-01-09 23:48:59

kennedy101
Member
Registered: 2008-09-16
Posts: 48

when restart or shutdown is selected from web page what script runs?

When I login to the firmware web page and select restart or shutdown from the systems page what scripts are executed?

Reason for asking - I have chroot debain running on a USB stick(s). I would like to echo a few umount commands for the USB drives into the restart/shutdown scripts BEFORE chroot runs. I would hope this would keep the ext2 and swap file systems on the flash drives healthy.


DNS 323 (Hardware B1, Firmware 1.06). 2x 1.5TB Seagate HDs.
Chroot Debain (Lenny) on USB (not reloaded). Edna server. USB print server. USB drives added to samba share. All init.d scripts in place.
Future projects: FFP reloaded then chroot on B1 hardware.

Offline

 

#2 2009-01-10 00:14:31

KRH
Member
From: Denmark
Registered: 2006-10-27
Posts: 219
Website

Re: when restart or shutdown is selected from web page what script runs?

there is written a file to /tmp/ think its named shutdown and after there i guess that one of the processes checks after it and acts after that.


First user to fun_plug the dns-323.

Offline

 

#3 2009-01-11 00:08:43

kennedy101
Member
Registered: 2008-09-16
Posts: 48

Re: when restart or shutdown is selected from web page what script runs?

I see in /sbin there are two binary files /sbin/reboot (linked to /sbin/halt) and /sbin/shutdown. Both are binaries (cat file shows weird characters, no plain text). Guess there arent any scripts that I can add a few lines to? An alternative would be to use ffp BEFORE I chroot to run e2fsk on the root and rtorrent partitions, also could mkswap to ensure swap is not currupted. Finally, it might not be a bad idea to copy the entire contents of the root partition to the hard drive before it is chroot'd. I've heard the USB diks use some sort of UDP communication and are prone to errors.  Having a few known good copies of previous directory structures would be helpful.

Ideally, gracefully unmounting the partitions /dev/sdc1 /dev/sdc2 and swap /dev/sdd1 would be the best solution.

Anyone know what the ffp script do_reboot does??  (just thinking out load) This might offer some clues how to circumvent the binary files used by the DNS 323.

I'll load up ffp and take a look at the scripts it used, and poke around some more.


DNS 323 (Hardware B1, Firmware 1.06). 2x 1.5TB Seagate HDs.
Chroot Debain (Lenny) on USB (not reloaded). Edna server. USB print server. USB drives added to samba share. All init.d scripts in place.
Future projects: FFP reloaded then chroot on B1 hardware.

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB