It might be that the underlying filesystem just doesn't support SELinux
labeling. This fixes creating swap on vfat live media:
# livecd-iso-to-disk.sh --msdos --swap-size-mb 666 ...
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
context_string = context_str(newcontext);
if (strcmp(context_string, oldcontext)!=0) {
- if (fsetfilecon(ctl.fd, context_string))
+ if (fsetfilecon(ctl.fd, context_string) && errno != ENOTSUP)
err(EXIT_FAILURE, _("unable to relabel %s to %s"),
ctl.devname, context_string);
}