Tiny Core Base > TCB Tips & Tricks

Apps downloading is pretty slow

<< < (12/15) > >>

Rich:
Hi Sashank999
Does this command produce any output:

--- Code: ---cat /opt/wlan0.sh
--- End code ---

GNUser:
Sashank999, sorry chattr didn't work. Maybe your filesystem doesn't support it.

Try adding your desired DNS servers to the top of /usr/share/udhcpc/default.script like this, for example:


--- Code: ---dns="1.1.1.1 1.0.0.1"
--- End code ---

Then running wifi.sh

jazzbiker:
Hi, GNUser!

Handy tip, thanks in advance! Currently I'm not suffering from DNS losses, but who knows, what's behind the corner.

GNUser:
Hi, Shashank999. I figured out the problem with chattr: In TCL, the root file system (including /etc/resolv.conf) exists only in RAM. Apparently ext3 and ext4 filesystems (and perhaps also other filesystems on a physical harddrive) support the immutable flag, but RAM filesystem does not.

Assuming your /opt directory is persistent, this will work (if your /home is persistent but not /opt, adjust the steps accordingly):


--- Code: ---$ cp /etc/resolv.conf /opt/resolv.conf
$ sudo rm /etc/resolv.conf
-> edit /opt/resolv.conf to taste
$ sudo chattr +i /opt/resolv.conf
$ sudo ln -s /opt/resolv.conf /etc/resolv.conf
--- End code ---

Now your DNS settings are immutable 8) (until you reboot or run sudo chattr -i /opt/resolv.conf).

GNUser:
You're welcome, jazzbiker. I hope it comes in handy sometime.

The trick with /usr/share/udhcpc/default.script is specific to DNS issues being caused by DHCP. The chattr trick has more general application--you can use it whenever you want to prevent unauthorized edits to a file (it is stronger than making the file read-only using chmod).

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version