Kaydet (Commit) 94fe2498 authored tarafından sulincix's avatar sulincix

fix live-config

üst bd2fbbc0
......@@ -12,9 +12,9 @@ fi
if [ "$LANG" == "" ] ; then
if [ -f /proc/cmdline ] ; then
LANG=$(cat /proc/cmdline | sed "s/ /\n/g" | grep LANG | sed "s/^LANG=//g")
[ "$LANG" == "" ] && LANG="C"
[ "$LANG" == "" ] && LANG="en_US.UTF-8"
else
LANG="C"
LANG="en_US.UTF-8"
fi
fi
[ "${CPIO_COMPRESS}" == "" ] && CPIO_COMPRESS=cat
......
......@@ -37,14 +37,19 @@ overlay_mount(){
}
live_config(){
if [ -f /rootfs/$subdir/sbin/openrc-run ] ; then
if [ "${live_user}" != "" ] ; then
chroot /rootfs/$subdir/ useradd "${live_user}" || true
else
chroot /rootfs/$subdir/ useradd "sulin" || true
if [ "${live_user}" == "" ] ; then
export live_user="user"
fi
if [ "${live_keyboard}" != "" ] ; then
echo "keymap=\"${live_keymap}\"" > /rootfs/$subdir/etc/conf.d/keymaps
if [ "${live_pass}" == "" ] ; then
export live_pass="live"
fi
if [ "${live_hostname}" == "" ] ; then
export live_hostname="SulinOS"
fi
chroot /rootfs/$subdir/ sh -c "useradd ${live_user}" || true
chroot /rootfs/$subdir/ sh -c "echo -ne \"${live_pass}\\n${live_pass}\\n\" | passwd ${live_user}" || true
chroot /rootfs/$subdir/ sh -c "echo -ne \"${live_pass}\\n${live_pass}\\n\" | passwd" || true
echo ${live_hostname} > /rootfs/$subdir/etc/hostname
if [ "${live_locale}" != "" ] ; then
export LANG=${live_locale}
export LC_ALL=${live_locale}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment