..:::.. .:..::..:.. :...::...
     
  DoppelGanger  
     

*nix Tips

GENTOO

View Installed Packages in Gentoo
qpkg -I
qpkg -I -v

Rsync Retries Limiter Option (put in /etc/make.conf)
RSYNC_RETRIES="3"
If you are using a (very) slow rsync server, rsync can time-out if no traffic is received anymore. The amount of seconds to wait before time-out is defined in the RSYNC_TIMEOUT variable and defaults to 180:
RSYNC_TIMEOUT="180"

View USE Options needed for a program
equery uses (package name)

CLEAR OUT BUILD FILES

/var/tmp/portage (ERASE ALL FILES IN THERE IF YOU WANT) extract folders
/usr/portage/distfiles/ location off all packages built

Build a Binary file

quickpkg packagename
emerge -B packagename
Control Boot Up Sequence
rc-update (add/delete/show)

World Upgrade Update
#emerge -uD world

Update portage and All Dependencies
emerge -Uu portage && emerge -UuDav world

Recompile everything
emerge -e world

Fixing Gentoo time
in /etc make sure EST is sysmlink to usr/share/zoneinfo/EST
localtime is sysmlink to /usr/share/zoneinfo/EST5EDT
and rc.local has local for timezone not UTC

Installing Masked packages
create dir /etc/portage
touch file portage.keywords then put masked package in file
ex. media-video/nvidia-kernel ~x86 or specific version you want for specific =media-video/nvidia-kernel-1.0.5336-r2 ~x86

Default Use
/etc/make.profile/make.defaults

Rebuild dependencies (it just remerges programs)
revdep-rebuild -p

To prelink System
emerge prelink
echo 'PRELINK_PATH_MASK="/opt"' > /etc/env.d/99prelink
prelink -afmR

To Un prelink system
prelink -uaf

DEBIAN

Static IP /etc/network/interfaces
iface eth0 inet static
address 192.168.2.4
netmask 255.255.255.0
broadcast 192.168.2.255
gateway 192.168.2.1
network 192.168.254.0

DHCP
iface eth0 inet dhcp

mplayer/libdvdcss server
deb ftp://ftp.nerim.net/debian-marillat/ testing main

controlling startup procs
update-rc.d

Xorg on Debian Sarge

Install these dependencies: flex, bison, libpam-dev, libpng-dev, libfontconfig-dev, libxft-dev, automake1.9, ncurses-dev

Remove: xserver-xfree86

Compile Xorg Source using this configuration file
Please Read the how to compile xorg documentation avaiable on the xorg site
After Installation is complete run the command ldconfig as root

OpenBSD

Setting up the bridge

First, we need to enable ip forwarding between the two network interfaces. Edit /etc/sysctl.conf and uncomment the line that reads: net.inet.ip.forwarding=1. This option only needs to be enabled if you will be using NAT features
Assuming the 2 bridge interfaces are fxp0 and fxp1 (if your interface names are different, change the interface names accordingly), create the following files with these parameters:
# ifconfig fxp0 delete
# echo 'up' > /etc/hostname.fxp0
# ifconfig fxp1 delete
# echo 'up' > /etc/hostname.fxp1
# echo 'add fxp0 add fxp1 up' > /etc/bridgename.bridge0
Reboot and verify that the bridge is up by running ifconfig -a. You should see output that includes this entry:
bridge0: flags=41 UP,RUNNING mtu 1500
Your bridge is now up and running and we can begin to configure the ruleset for pf.

pf Configuration

pf (Packet Filter) is the packet filtering system in OpenBSD 3.0 and later. Its syntax and functionality are very similar to ipf in both FreeBSD, NetBSD, and earlier versions of OpenBSD. If you are familiar with ipf ruleset syntax, pf syntax should be readable.
Enable pf filtering
In /etc/rc.conf, pf is disabled by default. Use pf=YES to enable.

Making An Openbsd Boot Cd Image

mkdir -p OpenBSD/3.7/i386
Download files from openbsd mirror to i386 dir. Might wanna also include ports, kernel, and system sources.
mkisofs -r -b 3.7/i386/cdrom37.fs -c "boot.catalog" -o OpenBSD37.iso OpenBSD

Adjusting Timezone after you have sysmlinked /etc/localtime
$ config -e -f /bsd
> timezone 300 1
> quit
300= (5 * 60) is the number of minutes to add to the pc clock to get UTC 1 is to tell that we use DST here. In this example time is off by 5 hours
Now Reboot

 
 
Gentoo
Debian
OpenBSD