summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-12-28 19:22:09 +0000
committerThierry Vignaud <tv@mageia.org>2012-12-28 19:22:09 +0000
commitfb61d07c0cf5880c3659381edad39cf1b7508122 (patch)
tree4efd9b1d2bc8027b0a5e05b902c4921d14645cb8 /tools
parenta83c8dbc7e6b32f7e9a22a4cba6e8b0db36e2cfe (diff)
downloaddrakx-backup-do-not-use-fb61d07c0cf5880c3659381edad39cf1b7508122.tar
drakx-backup-do-not-use-fb61d07c0cf5880c3659381edad39cf1b7508122.tar.gz
drakx-backup-do-not-use-fb61d07c0cf5880c3659381edad39cf1b7508122.tar.bz2
drakx-backup-do-not-use-fb61d07c0cf5880c3659381edad39cf1b7508122.tar.xz
drakx-backup-do-not-use-fb61d07c0cf5880c3659381edad39cf1b7508122.zip
factorize
Diffstat (limited to 'tools')
-rwxr-xr-xtools/drakx-in-chroot18
1 files changed, 7 insertions, 11 deletions
diff --git a/tools/drakx-in-chroot b/tools/drakx-in-chroot
index 2a4b525ff..a75699341 100755
--- a/tools/drakx-in-chroot
+++ b/tools/drakx-in-chroot
@@ -87,17 +87,13 @@ sys("$sudo mount -t sysfs none $SLASH_LOCATION/sys");
sys("$sudo mount -t debugfs none $SLASH_LOCATION/sys/kernel/debug");
sys("$sudo mount -t tmpfs none $SLASH_LOCATION/run");
-if (-d "/run/udev") {
- # Ensure we mount the udev run dir for various extra metadata from udevadm
- mkdir_p("$SLASH_LOCATION/run/udev");
- sys("$sudo mount -o bind /run/udev $SLASH_LOCATION/run/udev");
-}
-
-if (-d "/run/initramfs") {
- # If dracut has been used (and thus udev has yummy metadata) make sure
- # drakx knows about it when running in the chroot
- mkdir_p("$SLASH_LOCATION/run/initramfs");
- sys("$sudo mount -o bind /run/initramfs $SLASH_LOCATION/run/initramfs");
+# - Ensure we mount the udev run dir for various extra metadata from udevadm
+# - If dracut has been used (and thus udev has yummy metadata) make sure
+# drakx knows about it when running in the chroot
+foreach my $dir (qw(initramfs udev)) {
+ next if !-d "/run/$dir";
+ mkdir_p("$SLASH_LOCATION/run/$dir");
+ sys("$sudo mount -o bind /run/$dir $SLASH_LOCATION/run/$dir");
}
if ($disk_iso_repository) {