diff options
Diffstat (limited to 'lib/libalpm')
-rw-r--r-- | lib/libalpm/trans.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/libalpm/trans.c b/lib/libalpm/trans.c index 9eb27c30..462b4d8b 100644 --- a/lib/libalpm/trans.c +++ b/lib/libalpm/trans.c @@ -552,6 +552,13 @@ int _alpm_runscriptlet(const char *root, const char *installfn, return(0); } + snprintf(tmpdir, PATH_MAX, "%sbin/sh", root); + if(stat(tmpdir, &buf)) { + /* not found */ + _alpm_log(PM_LOG_ERROR, _("No /bin/sh in root dir (%s), aborting scriptlet\n"), root); + return(0); + } + if(!strcmp(script, "pre_upgrade") || !strcmp(script, "pre_install")) { snprintf(tmpdir, PATH_MAX, "%stmp/", root); if(stat(tmpdir, &buf)) { |