OSDN Git Service

[fix] : Fixed customize airootfs
authormk-linux419 <m.k419sabuaka@gmail.com>
Sat, 15 Aug 2020 05:02:30 +0000 (14:02 +0900)
committermk-linux419 <m.k419sabuaka@gmail.com>
Sat, 15 Aug 2020 05:02:30 +0000 (14:02 +0900)
channels/share/airootfs/root/customize_airootfs.sh
lubs

index b765c17..b509e67 100644 (file)
@@ -69,7 +69,6 @@ function create_user () {
 
     if [[ $(user_check ${_username}) = false ]]; then
         useradd -m -s ${usershell} ${_username}
-        groupadd sudo
         usermod -U -g ${_username} ${_username}
         usermod -aG sudo ${_username}
         usermod -aG storage ${_username}
diff --git a/lubs b/lubs
index e833336..58184db 100755 (executable)
--- a/lubs
+++ b/lubs
@@ -392,7 +392,7 @@ make_customize_airootfs() {
 
     #-- Run scripts --#
     local _customize_siript_options
-    _customize_siript_options="-a ${arch} -u '${username}' -p '${password}' -s '${usershell}'"
+    _customize_siript_options="-a ${arch} -u ${username} -p ${password} -s ${usershell}"
 
     #if ${bash_debug}; then
     #    _customize_siript_options="$_customize_siript_options -x"
@@ -406,7 +406,7 @@ make_customize_airootfs() {
     run_customize_script() {
         if [[ -f "${1}" ]]; then
             chmod 755 "${1}"
-            run_cmd "${2} ${_customize_siript_options}"
+            run_cmd "${2}" "${_customize_siript_options}"
         fi
     }
     run_customize_script "${work_dir}/airootfs/root/customize_airootfs.sh" "/root/customize_airootfs.sh"
@@ -434,7 +434,7 @@ make_bootfiles() {
         wget -O "${cache_dir}/memtest86-usb.zip" https://www.memtest86.com/downloads/memtest86-usb.zip
     fi
 
-    (unzip -p "${cache_dir}/memtest86-usb.zip memtest86-usb.img" > "${bootfiles_dir}/install/memtest86")
+    bash -c "unzip -p ${cache_dir}/memtest86-usb.zip memtest86-usb.img > ${bootfiles_dir}/install/memtest86"
 }
 
 make_grubcfg() {