summaryrefslogtreecommitdiff
path: root/configs/syslinux-iso/overlay/etc/rc.d/archiso
diff options
context:
space:
mode:
Diffstat (limited to 'configs/syslinux-iso/overlay/etc/rc.d/archiso')
-rw-r--r--configs/syslinux-iso/overlay/etc/rc.d/archiso36
1 files changed, 30 insertions, 6 deletions
diff --git a/configs/syslinux-iso/overlay/etc/rc.d/archiso b/configs/syslinux-iso/overlay/etc/rc.d/archiso
index 735c297..20c964f 100644
--- a/configs/syslinux-iso/overlay/etc/rc.d/archiso
+++ b/configs/syslinux-iso/overlay/etc/rc.d/archiso
@@ -22,12 +22,12 @@ scan_mount_pts ()
devname="/dev/$(echo ${dev} | cut -d'/' -f3,4 | cut -d'/' -f1)"
mountpt="/mnt/$(basename '${devname}')"
- mkdir -p "${mountpt}" 2>/dev/null
- mount ${options} "${devname}" "${mountpt}" >/dev/null 2>&1
+ mkdir -p "${mountpt}" 2>/dev/null
+ mount ${options} "${devname}" "${mountpt}" >/dev/null 2>&1
- fstype=$(awk '{ if ($1=="${devname}") { print $3" "$4;q }}' /proc/mounts)
- fstype="${fstype%%,*}"
- case "${fstype%% *}" in
+ fstype=$(awk '{ if ($1=="${devname}") { print $3" "$4;q }}' /proc/mounts)
+ fstype="${fstype%%,*}"
+ case "${fstype%% *}" in
*fat*|ntfs|*dos) options="user,exec,uid=0,gid=100,umask=00070" ;;
*) options="users,defaults,exec" ;;
#TODO handle 'sync' on usb devices...
@@ -42,7 +42,7 @@ scan_swap ()
{
#Archie finds a pagefile.sys for windows/dos machines... may add later
stat_busy "Finding existing swap partitions"
- swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
+ swapdev="$(fdisk -l 2>/dev/null | grep swap | cut -d' ' -f1)"
if [ -e "${swapdev}" ]; then
swapon ${swapdev}
echo "${swapdev} swap swap defaults 0 0 #configured by archiso" >>/etc/fstab
@@ -61,3 +61,27 @@ do_homedir ()
done
stat_done
}
+
+do_makeuser ()
+{
+ stat_busy "Making the default user arch"
+ addgroups="audio,disk,optical,wheel"
+ useradd -p "" -g users -G $addgroups arch
+ stat_done
+}
+
+do_locale_gen ()
+{
+ stat_busy "Generating locales..."
+ sed -i "s/#\(${LOCALE/[@.]*}\)/\1/" /etc/locale.gen
+ /usr/sbin/locale-gen
+ stat_done
+}
+
+case "$1" in
+ start)
+ do_locale_gen
+ do_makeuser
+ ;;
+esac
+exit 0