int ret;
bool src_islink = false;
bool src_isdir = false;
- mode_t src_mode = 0;
char *hash_path = NULL;
const char *src, *dst;
} else {
src_islink = S_ISLNK(sb.st_mode);
src_isdir = S_ISDIR(sb.st_mode);
- src_mode = sb.st_mode;
}
/* The install hasn't succeeded yet, but mark this item as successful
return 1;
}
- if (resolvedeps && S_ISREG(sb.st_mode) && (sb.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) {
+ if (resolvedeps && S_ISREG(sb.st_mode)) {
log_debug("'%s' already exists, but checking for any deps", fulldstpath);
if (sysrootdirlen && (strncmp(fulldstpath, sysrootdir, sysrootdirlen) == 0))
ret = resolve_deps(fulldstpath + sysrootdirlen, NULL);
return 0;
}
- if (src_mode & (S_IXUSR | S_IXGRP | S_IXOTH)) {
- if (resolvedeps) {
- /* ensure fullsrcpath contains sysrootdir */
- if (sysrootdirlen && (strncmp(fullsrcpath, sysrootdir, sysrootdirlen) == 0))
- ret += resolve_deps(fullsrcpath + sysrootdirlen, NULL);
- else
- ret += resolve_deps(fullsrcpath, NULL);
- }
- if (arg_hmac) {
- /* copy .hmac files also */
- hmac_install(src, dst, NULL);
- }
+ if (resolvedeps) {
+ /* ensure fullsrcpath contains sysrootdir */
+ if (sysrootdirlen && (strncmp(fullsrcpath, sysrootdir, sysrootdirlen) == 0))
+ ret += resolve_deps(fullsrcpath + sysrootdirlen, NULL);
+ else
+ ret += resolve_deps(fullsrcpath, NULL);
+ }
+ if (arg_hmac) {
+ /* copy .hmac files also */
+ hmac_install(src, dst, NULL);
}
log_debug("dracut_install ret = %d", ret);