This snippet of code in the init script does not deal with TERMCAP correctly. for envkey in `env| cut -d'=' -f1` do unset $envkey done Unless the TERMCAP entry is unset, the init script cannot run as written.