Use the following sed command to clean up config files and remove all the comments and blank lines:
sed '/ *#/d; /^ *$/d'
sed '/ *#/d; /^ *$/d'
|
Use the following sed command to clean up config files and remove all the comments and blank lines:
sed '/ *#/d; /^ *$/d' I got a BlackBerry 8330 a little while ago and decided I'd figure out how to get PAM working. Like most things I like to do things the manual way, this way I know exactly whats going on. So to start you may need to 'apt-get install bluez-utils build-essential ppp ' to get everything you need.
in /etc/bluetooth/hcid.conf: options { autoinit yes; security auto; pairing multi; passkey "1234"; } device { name "mylaptop"; class 0x000100; iscan enable; pscan enable; lm accept, master; lp rswitch,hold,sniff,park; } and in /etc/bluetooth/pin PIN:1234 next go to /usr/share/doc/bluez-utils/examples and run: make cp passkey-agent /usr/local/bin/ run that : passkey-agent 1234 change the pin and passkey to what ever you want to use now, restart bluetooth /etc/init.d/bluetooth restart find the bb: hcitool scan that should give you a list of devices, then run ( replace 00:11:22:33:44:55 with your BB hardware address ) : sdptool browse 00:11:22:33:44:55 your blackberry should ask for your pin then once you have paired, run sdptool search DUN (note which channel its on) next edit /etc/bluetooth/rfcomm.conf : rfcomm1 { bind yes; device 00:11:22:33:44:55; channel 3; comment “Bluetooth BB Connection”; } and in /etc/ppp/peers/blackberry: debug debug debug nodetach /dev/rfcomm1 115200 connect "/usr/sbin/chat -f /etc/chatscripts/blackberry" nomultilink defaultroute noipdefault ipcp-restart 7 ipcp-accept-local ipcp-accept-remote # need lcp-echo turned off, at least for t-mobile # disconnects after few mn of inactivity. # thanks to 'loon' for this info lcp-echo-interval 0 lcp-echo-failure 999 modem noauth nocrtscts noipdefault novj # refused anyway, no point in trying every time usepeerdns user "" password "" and edit /etc/chatscripts/blackberry: ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE' ABORT \ 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED ABORT ERROR SAY "Initializing\n" '' ATZ OK-AT-OK ATDT#777 CONNECT \d\c then we can now: pppd call blackberry and it should be up and running ! <sarcasam> That was easy huh? </sarcasam> There are a couple things to watch out with this install. When installing the system, the installer switches eth0 and eth1 and also detects the first drive as /dev/sdb not /dev/sda. This requires you to edit the grub conf at boot and switch sdb with sda. That will allow the system to boot up properly, but /etc/fstab is still incorrect and needs to fixed as well.
For this install I broke the existing virtual disks on the raid and created a 10G disk for the system and created a second virtual disk with the remaining space allocated for xen servers. Create a 3T lvm partition: myxenserver:~# fdisk -l /dev/sdb Disk /dev/sdb: 3737.2 GB, 3737292636160 bytes 255 heads, 63 sectors/track, 454366 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System myxenserver:~# parted /dev/sdb mklabel gpt Information: Don't forget to update /etc/fstab, if necessary. myxenserver:~# parted /dev/sdb print Disk /dev/sdb: 3737GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags Information: Don't forget to update /etc/fstab, if necessary. myxenserver:~# parted /dev/sdb mkpart ext2 0 3737GB myxenserver:~# parted /dev/sdb print Disk /dev/sdb: 3737GB Sector size (logical/physical): 512B/512B Partition Table: gpt Number Start End Size File system Name Flags 1 17.4kB 3737GB 3737GB ext2 Information: Don't forget to update /etc/fstab, if necessary. myxenserver:~# vgcreate xen /dev/sdb1 Volume group "xen" successfully created myxenserver:~# vgdisplay --- Volume group --- VG Name xen System ID Format lvm2 Metadata Areas 1 Metadata Sequence No 1 VG Access read/write VG Status resizable MAX LV 0 Cur LV 0 Open LV 0 Max PV 0 Cur PV 1 Act PV 1 VG Size 3.40 TB PE Size 4.00 MB Total PE 891039 Alloc PE / Size 0 / 0 Free PE / Size 891039 / 3.40 TB VG UUID kZ260M-qv13-7unz-Rwd8-TfbM-qIUF-7PSHaB Now install some packages that we will need: myxenserver:~# apt-get install bridge-utils iproute linux-image-2.6.18-6-xen-amd64 nmap tcpdump xen-hypervisor-3.0.3-1-amd64 xen-ioemu-3.0.3-1 xen-linux-system-2.6.18-6-xen-amd64 xen-tools xen-utils-3.0.3-1 xen-utils-common now, reboot into the new xen enabled kernel. edit your /etc/xen-tools/xen-tools.conf to relect your local setting, the ones I use are : #start xen-tools.conf lvm = xen size = 4Gb # Disk image size. memory = 256Mb # Memory size swap = 128Mb # Swap size fs = ext3 # use the EXT3 filesystem for the disk image. dist = etch # Default distribution to install. image = sparse # Specify sparse vs. full disk images. gateway = 10.1.2.1 netmask = 255.255.255.0 kernel = /boot/vmlinuz-2.6.18-6-xen-vserver-amd64 initrd = /boot/initrd.img-2.6.18-6-xen-vserver-amd64 mirror = http://ftp.us.debian.org/debian/ ## end xen-tools.conf now, edit /etc/xen/xend-config.sxp and uncomment: (network-script network-bridge) and I set: (dom0-cpus 2) now restart xen: /etc/init.d/xend now to create a xen instance xen-create-image --hostname=xensever01 --size=300G --ip=10.1.2.100 -netmask=255.255.255.0 start the xen instance: xm create /etc/xen/xenserver01.cfg and you can now connect to it: xm console xensever01 Log in with root, no password should be set at this time, so now would be a good time to set it. Congrats! you now have a xen server up and running ready to get what ever software you want. Here's an easy way to figure out the correct resolution for your T61, or pretty much anything else:
hwinfo --framebuffer In the output, you should see something like this: Mode 0x036e: 1680x1050 (+6720), 24 bits Take that mode for your vga= on your kernel line: title Debian GNU/Linux, kernel 2.6.21-2-686 root (hd0,0) kernel /boot/vmlinuz-2.6.21-2-686 root=/dev/sda1 ro vga=0x036e initrd /boot/initrd.img-2.6.21-2-686 savedefault then, when you reboot, it should come up with the correct resolution. |