Here is a simple script to remove blank space in filenames in a directory tree. One could definitely use that script to change other characters too.
You can use it as a script or a single command line.
IFS=$'\n';for files in `find . -type f`; do NewFile=`echo $files | sed 's/ /_/g'`; mv "$files" $NewFile; done;unset IFS
Monday, August 27, 2007
Tuesday, August 21, 2007
Recovering from a hard disk crash on Sun servers
A server was setup with a mirror of 2 internal disk. This mirror was created using Solaris 9 built-in disk tools : disksuite.
Following a reboot, one of the 2 disks died and it was the primary boot disk ( of course ! ). So the server was not able to boot. We had to find a way of booting from the second disk.
At the ok prompt we created a new alias :
nvalias disk2 /pci@1f,4000/scsi@3/disk@0,0
then
boot disk2
and the server booted. The challenge here was to find the correct syntax for the device. So we typed in :
show-devs
We saw 2 disks. From another identical server, we typed in /usr/sbin/prtconf -vp :
Node 0xf002ce38
screen: /pci@1f,2000/TSI,gfxp@1
net: /pci@1f,4000/network@1,1
disk: /pci@1f,4000/scsi@3/disk@0,0
cdrom: /pci@1f,4000/scsi@3/disk@6,0:f
tape: /pci@1f,4000/scsi@3,1/tape@4,0
tape1: /pci@1f,4000/scsi@3,1/tape@5,0
tape0: /pci@1f,4000/scsi@3,1/tape@4,0
disk6: /pci@1f,4000/scsi@3/disk@6,0
disk5: /pci@1f,4000/scsi@3/disk@5,0
disk4: /pci@1f,4000/scsi@3/disk@4,0
disk3: /pci@1f,4000/scsi@3/disk@3,0
disk2: /pci@1f,4000/scsi@3/disk@2,0
disk1: /pci@1f,4000/scsi@3/disk@1,0
disk0: /pci@1f,4000/scsi@3/disk@0,0
scsi: /pci@1f,4000/scsi@3
floppy: /pci@1f,4000/ebus@1/fdthree
ttyb: /pci@1f,4000/ebus@1/se:b
ttya: /pci@1f,4000/ebus@1/se:a
keyboard!: /pci@1f,4000/ebus@1/su@14,3083f8:forcemode
keyboard: /pci@1f,4000/ebus@1/su@14,3083f8
mouse: /pci@1f,4000/ebus@1/su@14,3062f8
name: 'aliases'
This is where we found the string for the nvalias command.
A nice link for all openboot command is : http://www.adminschoice.com/docs/open_boot.htm
Following a reboot, one of the 2 disks died and it was the primary boot disk ( of course ! ). So the server was not able to boot. We had to find a way of booting from the second disk.
At the ok prompt we created a new alias :
nvalias disk2 /pci@1f,4000/scsi@3/disk@0,0
then
boot disk2
and the server booted. The challenge here was to find the correct syntax for the device. So we typed in :
show-devs
We saw 2 disks. From another identical server, we typed in /usr/sbin/prtconf -vp :
Node 0xf002ce38
screen: /pci@1f,2000/TSI,gfxp@1
net: /pci@1f,4000/network@1,1
disk: /pci@1f,4000/scsi@3/disk@0,0
cdrom: /pci@1f,4000/scsi@3/disk@6,0:f
tape: /pci@1f,4000/scsi@3,1/tape@4,0
tape1: /pci@1f,4000/scsi@3,1/tape@5,0
tape0: /pci@1f,4000/scsi@3,1/tape@4,0
disk6: /pci@1f,4000/scsi@3/disk@6,0
disk5: /pci@1f,4000/scsi@3/disk@5,0
disk4: /pci@1f,4000/scsi@3/disk@4,0
disk3: /pci@1f,4000/scsi@3/disk@3,0
disk2: /pci@1f,4000/scsi@3/disk@2,0
disk1: /pci@1f,4000/scsi@3/disk@1,0
disk0: /pci@1f,4000/scsi@3/disk@0,0
scsi: /pci@1f,4000/scsi@3
floppy: /pci@1f,4000/ebus@1/fdthree
ttyb: /pci@1f,4000/ebus@1/se:b
ttya: /pci@1f,4000/ebus@1/se:a
keyboard!: /pci@1f,4000/ebus@1/su@14,3083f8:forcemode
keyboard: /pci@1f,4000/ebus@1/su@14,3083f8
mouse: /pci@1f,4000/ebus@1/su@14,3062f8
name: 'aliases'
This is where we found the string for the nvalias command.
A nice link for all openboot command is : http://www.adminschoice.com/docs/open_boot.htm
Thursday, August 9, 2007
websm on Fedora core 6
I recently installed FC6 on my linux workstation. Everything was fine until I tried running IBM websm management console.
I got the following error message :
java full version "J2RE 1.4.2 IBM build cxia32142-20050609"
+ java -Xbootclasspath/p:auiml/xerces.jar -Xms20m -Xmine4m -Xmx512m -DWEBSM_NO_REMOTE_CLASS_LOADING=false -DWEBSM_NO_SECURITY_MANAGER=false -Djava.security.policy=../config/websm.policy '-Dawt.appletWarning=Remote class Window' -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR=/opt/websm com.ibm.websm.console.WConsole
java.lang.ExceptionInInitializerError
at com.ibm.websm.etc.EImageCache._init(EImageCache.java:164)
at com.ibm.websm.etc.EImageCache.init(EImageCache.java:255)
at com.ibm.websm.etc.EImageCache.(EImageCache.java:152)
at com.ibm.websm.bridge.WSessionMgr.(WSessionMgr.java:185)
at com.ibm.websm.bridge.WSessionMgr.(WSessionMgr.java:217)
at com.ibm.websm.bridge.WSessionMgr.getSessionMgr(WSessionMgr.java:241)
at com.ibm.websm.gevent.GEventSupport.(GEventSupport.java:34)
at com.ibm.websm.gevent.GEventSupport.doSetup(GEventSupport.java:97)
at com.ibm.websm.gevent.GEventSupport.addEventListener(GEventSupport.java:115)
at com.ibm.websm.diagnostics.IDebug.Setup(IDebug.java:789)
at com.ibm.websm.diagnostics.IDebug.enabled(IDebug.java:1110)
at com.ibm.websm.diagnostics.Diag.(Diag.java:53)
at com.ibm.websm.console.WConsole.main(WConsole.java:1641)
Caused by: java.lang.NullPointerException
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2171)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2006)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:76)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:287)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1488)
at java.awt.Toolkit.(Toolkit.java:1511)
... 13 more
I don't know exactly what was wrong but it had something to do with my java installation. So I edited the file /opt/websm/bin/wsm and did the change below :
BEFORE
#Set new path to WEBSM export PATH=../_jvm/bin:../bin:/bin:/usr/bin:/opt/kde3/bin echo PATH = $PATH
AFTER
#Set new path to WEBSM export PATH=/usr/java/jre/bin:../_jvm/bin:../bin:/bin:/usr/bin:/opt/kde3/bin echo PATH = $PATH
Then I run it : ./wsm and got the following message :
USING JAVA:
java full version "1.5.0_10-b03"
+ java -Xbootclasspath/p:auiml/xerces.jar -Xms20m -Xmine4m -Xmx512m -DWEBSM_NO_REMOTE_CLASS_LOADING=false -DWEBSM_NO_SECURITY_MANAGER=false -Djava.security.policy=../config/websm.policy '-Dawt.appletWarning=Remote class Window' -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR=/opt/websm com.ibm.websm.console.WConsole
Unrecognized option: -Xmine4m
Could not create the Java virtual machine.
So I edited again the file and took out the option parameter for the JVM :
BEFORE
java ${BOOTPATH} -Xms$W_HEAP_MIN_SIZE -Xmine$W_HEAP_INC_SIZE -Xmx$W_HEAP_MAX_SIZE $ACCESSIBLE -DWEBSM_NO_REMOTE_CLASS_LOADING=$WNRCL -DWEBSM_NO_SECURITY_MANAGER=$WNSM $WSMSSL -Djava.security.policy=../config/websm.policy -Dawt.appletWarning="Remote class Window" -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR="$WSMDIR" com.ibm.websm.console.WConsole
AFTER
java ${BOOTPATH} -Xms$W_HEAP_MIN_SIZE -Xmx$W_HEAP_MAX_SIZE $ACCESSIBLE -DWEBSM_NO_REMOTE_CLASS_LOADING=$WNRCL -DWEBSM_NO_SECURITY_MANAGER=$WNSM $WSMSSL -Djava.security.policy=../config/websm.policy -Dawt.appletWarning="Remote class Window" -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR="$WSMDIR" com.ibm.websm.console.WConsole
I can now run websm on my workstation.
I got the following error message :
java full version "J2RE 1.4.2 IBM build cxia32142-20050609"
+ java -Xbootclasspath/p:auiml/xerces.jar -Xms20m -Xmine4m -Xmx512m -DWEBSM_NO_REMOTE_CLASS_LOADING=false -DWEBSM_NO_SECURITY_MANAGER=false -Djava.security.policy=../config/websm.policy '-Dawt.appletWarning=Remote class Window' -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR=/opt/websm com.ibm.websm.console.WConsole
java.lang.ExceptionInInitializerError
at com.ibm.websm.etc.EImageCache._init(EImageCache.java:164)
at com.ibm.websm.etc.EImageCache.init(EImageCache.java:255)
at com.ibm.websm.etc.EImageCache.
at com.ibm.websm.bridge.WSessionMgr.
at com.ibm.websm.bridge.WSessionMgr.
at com.ibm.websm.bridge.WSessionMgr.getSessionMgr(WSessionMgr.java:241)
at com.ibm.websm.gevent.GEventSupport.
at com.ibm.websm.gevent.GEventSupport.doSetup(GEventSupport.java:97)
at com.ibm.websm.gevent.GEventSupport.addEventListener(GEventSupport.java:115)
at com.ibm.websm.diagnostics.IDebug.Setup(IDebug.java:789)
at com.ibm.websm.diagnostics.IDebug.enabled(IDebug.java:1110)
at com.ibm.websm.diagnostics.Diag.
at com.ibm.websm.console.WConsole.main(WConsole.java:1641)
Caused by: java.lang.NullPointerException
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2171)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:2006)
at java.lang.Runtime.loadLibrary0(Runtime.java:824)
at java.lang.System.loadLibrary(System.java:908)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:76)
at java.security.AccessController.doPrivileged1(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:287)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1488)
at java.awt.Toolkit.
... 13 more
I don't know exactly what was wrong but it had something to do with my java installation. So I edited the file /opt/websm/bin/wsm and did the change below :
BEFORE
#Set new path to WEBSM export PATH=../_jvm/bin:../bin:/bin:/usr/bin:/opt/kde3/bin echo PATH = $PATH
AFTER
#Set new path to WEBSM export PATH=/usr/java/jre/bin:../_jvm/bin:../bin:/bin:/usr/bin:/opt/kde3/bin echo PATH = $PATH
Then I run it : ./wsm and got the following message :
USING JAVA:
java full version "1.5.0_10-b03"
+ java -Xbootclasspath/p:auiml/xerces.jar -Xms20m -Xmine4m -Xmx512m -DWEBSM_NO_REMOTE_CLASS_LOADING=false -DWEBSM_NO_SECURITY_MANAGER=false -Djava.security.policy=../config/websm.policy '-Dawt.appletWarning=Remote class Window' -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR=/opt/websm com.ibm.websm.console.WConsole
Unrecognized option: -Xmine4m
Could not create the Java virtual machine.
So I edited again the file and took out the option parameter for the JVM :
BEFORE
java ${BOOTPATH} -Xms$W_HEAP_MIN_SIZE -Xmine$W_HEAP_INC_SIZE -Xmx$W_HEAP_MAX_SIZE $ACCESSIBLE -DWEBSM_NO_REMOTE_CLASS_LOADING=$WNRCL -DWEBSM_NO_SECURITY_MANAGER=$WNSM $WSMSSL -Djava.security.policy=../config/websm.policy -Dawt.appletWarning="Remote class Window" -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR="$WSMDIR" com.ibm.websm.console.WConsole
AFTER
java ${BOOTPATH} -Xms$W_HEAP_MIN_SIZE -Xmx$W_HEAP_MAX_SIZE $ACCESSIBLE -DWEBSM_NO_REMOTE_CLASS_LOADING=$WNRCL -DWEBSM_NO_SECURITY_MANAGER=$WNSM $WSMSSL -Djava.security.policy=../config/websm.policy -Dawt.appletWarning="Remote class Window" -DWEBSM_ALL_PERMISSIONS_FOR_SECURE=true -DWSMDIR="$WSMDIR" com.ibm.websm.console.WConsole
I can now run websm on my workstation.
Tuesday, July 17, 2007
Configuring kvpnc
Here is the configuration options I use. Everything else should not be selected :
Profile
- General
-- Advanced
---- Enable advanced settings
---- Perfect Forward secrecy (PFS): server
- Authenticate
-- User data
---- Username : put your username
---- Password : put your password
---- Save user password
-- PSK
---- Save PSK
---- Pre shared key: Company pre-shared key
-- Network
--- General
---- Use connection status check
------ Interval : 1
------ Success count : 4
---- Use specified address to ping : put your workstation IP
--- Routes
---- Replace default route
--- NAT
---- Use UDP (NAT-T)
I sometime get timeout on the VPN server but If I retry it works.
Profile
- General
-- Advanced
---- Enable advanced settings
---- Perfect Forward secrecy (PFS): server
- Authenticate
-- User data
---- Username : put your username
---- Password : put your password
---- Save user password
-- PSK
---- Save PSK
---- Pre shared key: Company pre-shared key
-- Network
--- General
---- Use connection status check
------ Interval : 1
------ Success count : 4
---- Use specified address to ping : put your workstation IP
--- Routes
---- Replace default route
--- NAT
---- Use UDP (NAT-T)
I sometime get timeout on the VPN server but If I retry it works.
Debugging LIRCD
Here are some information I took on a working machine :
lirc stuff works like this :
Kernel module gets IR stuff -> /dev/lirc
lircd reads /dev/lirc and uses /etc/lircd.conf to get /dev/lircd
irw attaches to /dev/lircd
mode2 attaches to /dev/lirc
problem is I think only one program can attach to /dev/lirc but gladly
lircd will accept multiple connections
[root@moon dev]# ls -l lirc*
lrwxrwxrwx 1 root root 5 Mar 18 10:11 lirc -> lirc0
crw------- 1 root root 61, 0 Mar 18 10:11 lirc0
srw-rw-rw- 1 root root 0 Mar 18 14:29 lircd
prw-r--r-- 1 root root 0 Mar 18 10:11 lircm
[root@moon dev]# lsmod | grep -i lirc
lirc_pvr150 19136 5
lirc_dev 12708 1 lirc_pvr150
ivtv 175760 5 lirc_pvr150
i2c_core 22209 10 lirc_pvr150,wm8775,cx25840,tda9887,tuner,ivtv,i2c_algo_bit,tveeprom,nvidia,i2c_i801
[root@moon dev]# mode2
code: 0x1794
code: 0x1f95
code: 0x1797
code: 0x1f96
code: 0x1f96
an interesting discussion can be found <a href="http://www.nabble.com/No--dev-lirc-when-upgrading-from-FC6-from-FC5.-t3167625.html">here</a>.
lirc stuff works like this :
Kernel module gets IR stuff -> /dev/lirc
lircd reads /dev/lirc and uses /etc/lircd.conf to get /dev/lircd
irw attaches to /dev/lircd
mode2 attaches to /dev/lirc
problem is I think only one program can attach to /dev/lirc but gladly
lircd will accept multiple connections
[root@moon dev]# ls -l lirc*
lrwxrwxrwx 1 root root 5 Mar 18 10:11 lirc -> lirc0
crw------- 1 root root 61, 0 Mar 18 10:11 lirc0
srw-rw-rw- 1 root root 0 Mar 18 14:29 lircd
prw-r--r-- 1 root root 0 Mar 18 10:11 lircm
[root@moon dev]# lsmod | grep -i lirc
lirc_pvr150 19136 5
lirc_dev 12708 1 lirc_pvr150
ivtv 175760 5 lirc_pvr150
i2c_core 22209 10 lirc_pvr150,wm8775,cx25840,tda9887,tuner,ivtv,i2c_algo_bit,tveeprom,nvidia,i2c_i801
[root@moon dev]# mode2
code: 0x1794
code: 0x1f95
code: 0x1797
code: 0x1f96
code: 0x1f96
an interesting discussion can be found <a href="http://www.nabble.com/No--dev-lirc-when-upgrading-from-FC6-from-FC5.-t3167625.html">here</a>.
Compiling Cisco vpnclient-linux-x86_64-4.8 on Fedora Core 6 x86_64 kernel 2.6.18/2.6.19
Thanks a lot to Amit who found the following solution ( http://blog.360.yahoo.com/blog-.WURHFYwdq8.zfEosWC6j8jQ?p=55 )
Unfortunately the cisco vpnclient-linux-x86_64-4.8 will not compile with the kernel (2.6.18) which comes with fedora core 6 or 2.6.19(latest stable from http://kernel.org) both x86 and x86_64 .
<u> <b>Error(s) you get while compiling</b></u>
#./vpn_install
Cisco Systems VPN Client Version 4.8.00 (0490) Linux Installer
Copyright (C) 1998-2005 Cisco Systems, Inc. All Rights Reserved.
By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with
its terms.
Directory where binaries will be installed [/usr/local/bin]
Automatically start the VPN service at boot time [yes]
In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.
Directory containing linux kernel source code [/lib/modules/2.6.19-1.meaks/build]
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/2.6.19-1.meaks/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/2.6.19-1.meaks/build" will be used to build the module.
Is the above correct [y]
Making module
make -C /lib/modules/2.6.19-1.meaks/build SUBDIRS=/home/amitkr/setups/vpnclient modules
make[1]: Entering directory `/home/amitkr/kernel/linux-2.6.19-1.meaks/build'
make[1]: Warning: File `Makefile' has modification time 1e+04 s in the future
make -C /home/amitkr/kernel/linux-2.6.19-1.meaks O=/home/amitkr/kernel/linux-2.6.19-1.meaks/build modules
CC [M] /home/amitkr/setups/vpnclient/interceptor.o
In file included from /home/amitkr/setups/vpnclient/Cniapi.h:15,
from /home/amitkr/setups/vpnclient/interceptor.c:30:
/home/amitkr/setups/vpnclient/GenDefs.h:110:2: warning: #warning 64 bit
/home/amitkr/setups/vpnclient/interceptor.c: In function handle_vpnup:
/home/amitkr/setups/vpnclient/interceptor.c:310: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c:334: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c:335: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c: In function do_cleanup:
/home/amitkr/setups/vpnclient/interceptor.c:378: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c: In function recv_ip_packet_handler:
/home/amitkr/setups/vpnclient/interceptor.c:553: error: CHECKSUM_HW undeclared (first use in this function)
/home/amitkr/setups/vpnclient/interceptor.c:553: error: (Each undeclared identifier is reported only once
/home/amitkr/setups/vpnclient/interceptor.c:553: error: for each function it appears in.)
/home/amitkr/setups/vpnclient/interceptor.c:557: error: too many arguments to function skb_checksum_help
/home/amitkr/setups/vpnclient/interceptor.c: In function do_cni_send:
/home/amitkr/setups/vpnclient/interceptor.c:680: error: CHECKSUM_HW undeclared (first use in this function)
/home/amitkr/setups/vpnclient/interceptor.c:683: error: too many arguments to function skb_checksum_help
make[4]: *** [/home/amitkr/setups/vpnclient/interceptor.o] Error 1
make[3]: *** [_module_/home/amitkr/setups/vpnclient] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/amitkr/kernel/linux-2.6.19-1.meaks/build'
make: *** [default] Error 2
Failed to make module "cisco_ipsec.ko".
<b> <u> What is the Problem ?</u></b>
This is because of
[1]
no more exists with, which used to be present in ${KSRCPATH}/build/include/linux/config.h with old kernels, after doing a make O=build menuconfig
[2]
For kernel 2.6.19 things are even worse, the CHECKSUM_HW macro does not exists any more in
[3]
the function skb_checksum_help(skb) declared in file and defined in file has been changed to take only a single argument.
<b> <u>Solution</u></b>
So, to compile the cisco vpn 4.8 x86_64 you need to:
[1] make a symlink to autoconfig.h as config.h
$ cd ${KSRCPATH}/build/include/linux
$ ln -s autoconfig.h config.h
This will solve the first problem
[2] the macro CHECKSUM_HW needs to be replaced with CHECKSUM_COMPLETE in the file ${VPNCLIENT}/interceptor.c
[3] edit the files calling skb_checksum_help() , look for the proper LINUX_VERSION_CODE macro that matches your kernel version(2.6.19) and remove the second argument from skb_checksum_help() so that the function looks like skb_checksum_help(skb).
The macro looks something like this
KERNEL_VERSION(2,6,10)
You can find the changes in concurrent releases of kernel in kernel ChangeLog<b></b>
Unfortunately the cisco vpnclient-linux-x86_64-4.8 will not compile with the kernel (2.6.18) which comes with fedora core 6 or 2.6.19(latest stable from http://kernel.org) both x86 and x86_64 .
<u> <b>Error(s) you get while compiling</b></u>
#./vpn_install
Cisco Systems VPN Client Version 4.8.00 (0490) Linux Installer
Copyright (C) 1998-2005 Cisco Systems, Inc. All Rights Reserved.
By installing this product you agree that you have read the
license.txt file (The VPN Client license) and will comply with
its terms.
Directory where binaries will be installed [/usr/local/bin]
Automatically start the VPN service at boot time [yes]
In order to build the VPN kernel module, you must have the
kernel headers for the version of the kernel you are running.
Directory containing linux kernel source code [/lib/modules/2.6.19-1.meaks/build]
* Binaries will be installed in "/usr/local/bin".
* Modules will be installed in "/lib/modules/2.6.19-1.meaks/CiscoVPN".
* The VPN service will be started AUTOMATICALLY at boot time.
* Kernel source from "/lib/modules/2.6.19-1.meaks/build" will be used to build the module.
Is the above correct [y]
Making module
make -C /lib/modules/2.6.19-1.meaks/build SUBDIRS=/home/amitkr/setups/vpnclient modules
make[1]: Entering directory `/home/amitkr/kernel/linux-2.6.19-1.meaks/build'
make[1]: Warning: File `Makefile' has modification time 1e+04 s in the future
make -C /home/amitkr/kernel/linux-2.6.19-1.meaks O=/home/amitkr/kernel/linux-2.6.19-1.meaks/build modules
CC [M] /home/amitkr/setups/vpnclient/interceptor.o
In file included from /home/amitkr/setups/vpnclient/Cniapi.h:15,
from /home/amitkr/setups/vpnclient/interceptor.c:30:
/home/amitkr/setups/vpnclient/GenDefs.h:110:2: warning: #warning 64 bit
/home/amitkr/setups/vpnclient/interceptor.c: In function handle_vpnup:
/home/amitkr/setups/vpnclient/interceptor.c:310: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c:334: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c:335: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c: In function do_cleanup:
/home/amitkr/setups/vpnclient/interceptor.c:378: warning: assignment from incompatible pointer type
/home/amitkr/setups/vpnclient/interceptor.c: In function recv_ip_packet_handler:
/home/amitkr/setups/vpnclient/interceptor.c:553: error: CHECKSUM_HW undeclared (first use in this function)
/home/amitkr/setups/vpnclient/interceptor.c:553: error: (Each undeclared identifier is reported only once
/home/amitkr/setups/vpnclient/interceptor.c:553: error: for each function it appears in.)
/home/amitkr/setups/vpnclient/interceptor.c:557: error: too many arguments to function skb_checksum_help
/home/amitkr/setups/vpnclient/interceptor.c: In function do_cni_send:
/home/amitkr/setups/vpnclient/interceptor.c:680: error: CHECKSUM_HW undeclared (first use in this function)
/home/amitkr/setups/vpnclient/interceptor.c:683: error: too many arguments to function skb_checksum_help
make[4]: *** [/home/amitkr/setups/vpnclient/interceptor.o] Error 1
make[3]: *** [_module_/home/amitkr/setups/vpnclient] Error 2
make[2]: *** [modules] Error 2
make[1]: *** [modules] Error 2
make[1]: Leaving directory `/home/amitkr/kernel/linux-2.6.19-1.meaks/build'
make: *** [default] Error 2
Failed to make module "cisco_ipsec.ko".
<b> <u> What is the Problem ?</u></b>
This is because of
[1]
no more exists with, which used to be present in ${KSRCPATH}/build/include/linux/config.h with old kernels, after doing a make O=build menuconfig
[2]
For kernel 2.6.19 things are even worse, the CHECKSUM_HW macro does not exists any more in
[3]
the function skb_checksum_help(skb) declared in file and defined in file has been changed to take only a single argument.
<b> <u>Solution</u></b>
So, to compile the cisco vpn 4.8 x86_64 you need to:
[1] make a symlink to autoconfig.h as config.h
$ cd ${KSRCPATH}/build/include/linux
$ ln -s autoconfig.h config.h
This will solve the first problem
[2] the macro CHECKSUM_HW needs to be replaced with CHECKSUM_COMPLETE in the file ${VPNCLIENT}/interceptor.c
[3] edit the files calling skb_checksum_help() , look for the proper LINUX_VERSION_CODE macro that matches your kernel version(2.6.19) and remove the second argument from skb_checksum_help() so that the function looks like skb_checksum_help(skb).
The macro looks something like this
KERNEL_VERSION(2,6,10)
You can find the changes in concurrent releases of kernel in kernel ChangeLog<b></b>
Create a dedicated user for mysql backup script
Here is how you create a backup user that will be used in backup scripts :
[root@MyServer /]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 89061 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT SELECT, SHOW DATABASES, LOCK TABLES ON *.* TO 'backup'@'localhost' IDENTIFIED BY 'MyPasswd';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
[root@MyServer /]# mysql -u root -p
Enter password:
Welcome to the MySQL monitor. Commands end with ; or \g.
Your MySQL connection id is 89061 to server version: 4.1.12
Type 'help;' or '\h' for help. Type '\c' to clear the buffer.
mysql> GRANT SELECT, SHOW DATABASES, LOCK TABLES ON *.* TO 'backup'@'localhost' IDENTIFIED BY 'MyPasswd';
Query OK, 0 rows affected (0.00 sec)
mysql> exit
Bye
Subscribe to:
Posts (Atom)