News for hackers. Stuff that matters.
Re:Cron checker by abpavel on Saturday July 16, 2016 @07:26AM (#12105998)
> It is a problem of using files.

In UNIX, everything is a file

Re:Cron checker by dozzie on Saturday July 16, 2016 @01:17PM (#12107069)
Oh, if only. Network interface is not a file. Process is not a file (though some of its metadata is accessible through different files under different unices). IPv4 routing entry is not a file. User account is not a file.

Do you see a pattern?

Re:Cron checker by abpavel on Sunday July 17, 2016 @04:21AM (#12109460)
Network interface: /sys/class/net/<name> Process: /proc/<id>/ IPv4 Route: /proc/net/route User account: /etc/passwd
Re:Cron checker by dozzie on Sunday July 17, 2016 @04:54AM (#12109511)
OK, configure the network interface this way. Oh, you can't. So it is not a file, it just has some metadata exposed with a file interface.

Create a process in the same manner. Oh, again you can't do that. What a shame.

And with route and user account examples you confuse being a file and being a record in a file (which, couriously, is not a file itself).

Re:Cron checker by abpavel on Sunday July 17, 2016 @09:50AM (#12110160)
You mean /etc/network/interfaces? I can set tx queue length of eth0 to 300 packets: echo 300 > /sys/class/net/eth0/tx_queue_len Or change frame forwarding behavior from switch to hub: cat 0x65535 > /sys/class/net/vnet0_11/bridge/group_fwd_mask

Granted, it's not possible to change IPv6 address through /proc/net/if_inet6, but just because I don't know about it, doesn't mean that it isn't possible.

Re:Cron checker by dozzie on Sunday July 17, 2016 @06:29PM (#12112189)
> You mean /etc/network/interfaces?

No. It's a configuration file for a separate set of tools that actually configure the interface for you. You can't set its current IP address by writing to any file.

> I can set tx queue length of eth0 to 300 packets: echo 300 > /sys/class/net/eth0/tx_queue_len Or change frame forwarding behavior from switch to hub: cat 0x65535 > /sys/class/net/vnet0_11/bridge/group_fwd_mask

Sorry, no banana; you only can control two or three aspects this way, and not the most fundamental ones at that.

Network interface is simply not a file, it's a separate OS-level construct, it's not exposed to userland as a file. Not everything in Linux or unix is a file, even though many things (the ones more remote from kernel) are.

Re:Cron checker by lifthrasiir on Saturday July 16, 2016 @07:30AM (#12106002)
If I were not clear enough, it is a problem of treating configuration files as like the runtime configuration. Not a problem of file formats (though some formats ease the job)---does this make sense?