From f47343bac2f390cc5136130a310b952882621adf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 28 Mar 2014 10:18:04 +0100 Subject: [PATCH] grub-pxelinux_config: use shell features for directory browsing --- templates/grub-pxelinux_config | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/templates/grub-pxelinux_config b/templates/grub-pxelinux_config index 694293e..ba1f2f4 100644 --- a/templates/grub-pxelinux_config +++ b/templates/grub-pxelinux_config @@ -94,9 +94,10 @@ fi # Copy initrd.img and vmlinuz from all directories which name begins # with grml, e.g. grml32full and grml64full # This way we can boot multiple ISOs -for filename in $(ls -d ${MULTIBOOT_PATH_}/grml*); do - cp -r ${filename} ${TFTPD_DATA_DIR_}/boot/ -done +for filename in "${MULTIBOOT_PATH_}"/grml* ; do + [ -d "$filename" ] || continue + cp -r "${filename}" "${TFTPD_DATA_DIR_}/boot/" +done config_files_=$(find "$TFTPD_DATA_DIR_/" -name "*.cfg" -type f) -- 2.1.4