Wednesday, November 18, 2009

Netwok Gotcha While Upgrading To openSUSE 11.2

Upgraded my machine from openSUSE 11.1 to 11.2. And bumped royally into bnc#546575. There's a typo in /etc/udev/rules/70-persistent-net.rules (an apparent holdout from openSUSE 10.x). So if your machine has a manually configured IP address, check /etc/udev/rules/70-persistent-net.rules before you update. If it contains the string ATTRS{address}, edit it so that it becomes ATTR{address}. Now the network configuration will be preserved after the upgrade.

Monday, November 02, 2009

SSH Works, SCP/SFTP Fails? Check all login scripts

Gaah! Some fool snuck an unconditional echo statement in a global profile. Surefire way to get scp and sftp to stop working. Lines that produce output, or exec statements should be conditionally placed in shell startup scripts. It's best not to have these lines take effect for non-interactive shells. I like to test "$0" to see if it begins with a '-' to determine if a shell is a login shell, and process the rest of the script accordingly. In bash:
case $0 in
-*) # Login shell
    ;;
 *) # non-interactive shell
    ;;
esac
In csh:
switch ($0)
       case -*:
          # login shell stuff

          breaksw
       default:
          # non-interactive stuff
          breaksw
endsw