Skip to content

Commit c99cafb

Browse files
committed
mklive.sh: ensure dash is /bin/sh if installed
1 parent 06fe42b commit c99cafb

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

mklive.sh

+8
Original file line numberDiff line numberDiff line change
@@ -164,13 +164,21 @@ install_packages() {
164164
if [ -f "$ROOTFS"/etc/default/libc-locales ]; then
165165
sed -e "s/\#\(${LOCALE}.*\)/\1/g" -i "$ROOTFS"/etc/default/libc-locales
166166
fi
167+
167168
if XBPS_ARCH=$BASE_ARCH "$XBPS_QUERY_CMD" -r "$ROOTFS" dkms >/dev/null 2>&1; then
168169
# dkms modules alphabetically before dkms can't configure
169170
# if dkms hasn't configured beforehand to create /var/lib/dkms
170171
chroot "$ROOTFS" env -i xbps-reconfigure dkms
171172
fi
173+
172174
chroot "$ROOTFS" env -i xbps-reconfigure -a
173175

176+
if XBPS_ARCH=$BASE_ARCH "$XBPS_QUERY_CMD" -r "$ROOTFS" dash >/dev/null 2>&1; then
177+
# bash configures alphabetically before dash,
178+
# so if it's installed we should ensure it's /bin/sh
179+
chroot "$ROOTFS" env -i xbps-alternatives -s dash
180+
fi
181+
174182
post_install_packages
175183
}
176184

0 commit comments

Comments
 (0)