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 2008-04-03 07:12:43

bigjimslade
New member
Registered: 2008-04-03
Posts: 4

Changes to files lost after reboot

I made some edits to the folowing files:

/etc/resolv.conf
/etc/hosts


after rebooting the dns323, the files reverted.

whats the best way to persist these changes across reboots?

I would also like to add some mount points is it safe edit fstab  or should i run the mount command from a script

I have the fun_plug version 4 installed

Thanks for any help

Offline

 

#2 2008-04-03 07:41:50

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Changes to files lost after reboot

At reboot the several files system files are copied from
NVRAM to the hard drive by the script /etc/rc.sh If you
want to modify those files you can create a script to make
the changes after they are copied from NVRAM each reboot.

For example to edit the hosts file create a script "host_edit.sh"

Code:

#!/bin/sh

/bin/echo "192.168.1.12 kuro kuro" >> /etc/hosts

This script adds the host definition for a system called 'kuro'

Place the "hosts_edit.sh" script in the /mnt/HD_a2/fun_plug.d/start
directory and make the script executable.  All executable script in
the /mnt/HD_a2/fun_plug.d/start directory will be executed by fun_plug
at startup (for fun_plug v.3 & v.4 - I haven't tried v.5 yet)

Last edited by mig (2008-04-03 07:42:41)


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

#3 2008-04-03 13:48:31

jayas
Member
Registered: 2008-01-24
Posts: 151

Re: Changes to files lost after reboot

Hi Mig,

mig wrote:

Code:

#!/bin/sh
/bin/echo "192.168.1.12 kuro kuro" >> /etc/hosts

This script adds the host definition for a system called 'kuro'

Apologies beforehand if this is a dumb question but isnt one 'kuro' sufficient?  Typo?

Jaya


H/W=B1 F/W=1.04; RAID1: SAMSUNG HD501LJ T166 (500GB, SATA 3.0Gb/s 16MB)

Offline

 

#4 2008-04-03 15:28:55

bigjimslade
New member
Registered: 2008-04-03
Posts: 4

Re: Changes to files lost after reboot

Thanks for the response. I'm going to try and test this out tonight.

I think that the second entry in the hosts file allows you to define an alias for the host. Since the name is the same, I'm not sure it is needed in this case; but probably doesn't hurt to add it.

Offline

 

#5 2008-04-03 17:54:51

mig
Member
From: Seattle, WA
Registered: 2006-12-21
Posts: 532

Re: Changes to files lost after reboot

The first entry, after the IP address, is the fully qualified domain name of the host
this can be determined by the command #hostname -f, the second (or more) entries
are alias for the host.  In this case they are the same, but that is because I haven't
setup a UNIX domain for my home network, behind a NAT router..


DNS-323 • 2x Seagate Barracuda ES 7200.10 ST3250620NS 250GB SATAII (3.0Gb/s) 7200RPM 16MB • RAID1 • FW1.03 • ext2 
Fonz's v0.3 fun_plug http://www.inreto.de/dns323/fun-plug

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB