summaryrefslogtreecommitdiffstats
path: root/lib/libalpm/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/libalpm/util.c')
-rw-r--r--lib/libalpm/util.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/libalpm/util.c b/lib/libalpm/util.c
index 6b2b60a6..680c4095 100644
--- a/lib/libalpm/util.c
+++ b/lib/libalpm/util.c
@@ -376,7 +376,7 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha
snprintf(cpath, PATH_MAX, "%s/chroot", dirs[i]);
if(!stat(cpath, &buf)) {
chrootbin = strdup(cpath);
- _alpm_log(PM_LOG_DEBUG, "found chroot binary: %s", chrootbin);
+ _alpm_log(PM_LOG_FLOW2, "found chroot binary: %s", chrootbin);
}
}
if(chrootbin == NULL) {
@@ -421,11 +421,11 @@ int _alpm_runscriptlet(char *root, char *installfn, char *script, char *ver, cha
_alpm_log(PM_LOG_FLOW2, "executing %s script...", script);
if(oldver) {
- snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | chroot %s /bin/sh",
- scriptpath, script, ver, oldver, root);
+ snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s %s\" | %s %s /bin/sh",
+ scriptpath, script, ver, oldver, chrootbin, root);
} else {
- snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s\" | chroot %s /bin/sh",
- scriptpath, script, ver, root);
+ snprintf(cmdline, PATH_MAX, "echo \"umask 0022; source %s %s %s\" | %s %s /bin/sh",
+ scriptpath, script, ver, chrootbin, root);
}
_alpm_log(PM_LOG_DEBUG, "%s", cmdline);
system(cmdline);