Archive for April, 2005

udevfs or devfs

Friday, April 1st, 2005

If you want to use pure udevfs then don’t set boot devfs on boot time in kernel config.

CONFIG_DEVFS_FS is not set

(in .config)

To use udevfs linux device naming convention install udevfs and do this step:

# emerge udev

Then

kernel /bzImage root=/dev/hda3 boot=nodevfs

(in grub.conf)

now when system boots it’ll use udevfs.

mod_rewrite serve pages depending on time

Friday, April 1st, 2005

Apache’s mod_rewrite can be used to serve pages depending on the time.

RewriteEngine on
RewriteCond %{TIME_HOUR}%{TIME_MIN} >2300
RewriteCond %{TIME_HOUR}%{TIME_MIN} <1900
RewriteRule ^index.php$ day.html
RewriteRule ^index.php$ night.html

When request for index.php is made then to corresponding time day.html or night.html page is served.