index : pacman | |
Archlinux32 fork of pacman | gitolite user |
summaryrefslogtreecommitdiff |
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-10-04 21:36:25 -0500 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2007-10-04 21:36:25 -0500 |
commit | 4853a4aad97fe36f9237ffb7356201adab507a1c (patch) | |
tree | 047da7b42849e5415d1a377091794ec80f93276a | |
parent | 98bcd1f5b1023b9eb219589c809fb2505079965d (diff) |
-rw-r--r-- | lib/libalpm/trans.c | 7 |
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)) { |