Diffstat (limited to 'noncore/apps/opie-console/MyPty.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/MyPty.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/MyPty.cpp b/noncore/apps/opie-console/MyPty.cpp index b0f0275..c3c58be 100644 --- a/noncore/apps/opie-console/MyPty.cpp +++ b/noncore/apps/opie-console/MyPty.cpp | |||
@@ -293,3 +293,18 @@ void MyPty::reload( const Profile& prof) { | |||
293 | m_env.clear(); | 293 | m_env.clear(); |
294 | m_cmd = prof.readEntry("Command", "/bin/bash"); | 294 | m_cmd = prof.readEntry("Command", "/bin/sh"); |
295 | |||
296 | /* | ||
297 | * Lets check if m_cmd actually | ||
298 | * exists.... | ||
299 | * we try to use bin/bash and if | ||
300 | * this fails we | ||
301 | * will fallback to /bin/sh | ||
302 | * which should be there 100% | ||
303 | */ | ||
304 | if ( !QFile::exists(QFile::encodeName(m_cmd) ) ) | ||
305 | if (QFile::exists("/bin/bash") ) | ||
306 | m_cmd = "/bin/bash"; | ||
307 | else | ||
308 | m_cmd = "/bin/sh"; | ||
309 | |||
295 | int envcount = prof.readNumEntry("EnvVars", 0); | 310 | int envcount = prof.readNumEntry("EnvVars", 0); |