summaryrefslogtreecommitdiff
path: root/iso/overlay/etc
diff options
context:
space:
mode:
Diffstat (limited to 'iso/overlay/etc')
-rw-r--r--iso/overlay/etc/arch-release1
-rw-r--r--iso/overlay/etc/archiso/functions12
-rw-r--r--iso/overlay/etc/archiso/getshell9
-rw-r--r--iso/overlay/etc/fstab7
-rw-r--r--iso/overlay/etc/hosts8
-rw-r--r--iso/overlay/etc/issue5
-rw-r--r--iso/overlay/etc/motd13
-rw-r--r--iso/overlay/etc/pacman.conf84
-rw-r--r--iso/overlay/etc/pam.d/su6
-rw-r--r--iso/overlay/etc/rc.conf25
-rwxr-xr-xiso/overlay/etc/rc.d/archiso96
-rw-r--r--iso/overlay/etc/sudoers2
12 files changed, 268 insertions, 0 deletions
diff --git a/iso/overlay/etc/arch-release b/iso/overlay/etc/arch-release
new file mode 100644
index 0000000..153f8b2
--- /dev/null
+++ b/iso/overlay/etc/arch-release
@@ -0,0 +1 @@
+Arch Linux Live ISO
diff --git a/iso/overlay/etc/archiso/functions b/iso/overlay/etc/archiso/functions
new file mode 100644
index 0000000..fdd48f4
--- /dev/null
+++ b/iso/overlay/etc/archiso/functions
@@ -0,0 +1,12 @@
+# vim: set ft=sh:
+
+cmdline_param ()
+{
+ for param in ${CMDLINE}; do
+ case "${param}" in
+ $1=*) echo "${param##*=}"; return ;;
+ *) continue ;;
+ esac
+ done
+ [ -n "${2}" ] && echo "${2}"
+}
diff --git a/iso/overlay/etc/archiso/getshell b/iso/overlay/etc/archiso/getshell
new file mode 100644
index 0000000..a6f8775
--- /dev/null
+++ b/iso/overlay/etc/archiso/getshell
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+. /etc/archiso/functions
+
+shell="$(cmdline_param shell)"
+[ -n "${shell}" ] && shell="/bin/bash"
+[ ! -e "${shell}" ] && shell="/bin/sh"
+
+exec ${shell}
diff --git a/iso/overlay/etc/fstab b/iso/overlay/etc/fstab
new file mode 100644
index 0000000..3c43a5e
--- /dev/null
+++ b/iso/overlay/etc/fstab
@@ -0,0 +1,7 @@
+# /etc/fstab: static file system information
+# <file system> <dir> <type> <options> <dump> <pass>
+aufs / aufs noauto 0 0
+none /dev/pts devpts defaults 0 0
+none /dev/shm tmpfs defaults 0 0
+
+### Auto generated entries get added here:
diff --git a/iso/overlay/etc/hosts b/iso/overlay/etc/hosts
new file mode 100644
index 0000000..b6f25e3
--- /dev/null
+++ b/iso/overlay/etc/hosts
@@ -0,0 +1,8 @@
+#
+# /etc/hosts: static lookup table for host names
+#
+
+#<ip-address> <hostname.domain.org> <hostname>
+127.0.0.1 localhost.localdomain localhost archiso
+
+# End of file
diff --git a/iso/overlay/etc/issue b/iso/overlay/etc/issue
new file mode 100644
index 0000000..ce82e88
--- /dev/null
+++ b/iso/overlay/etc/issue
@@ -0,0 +1,5 @@
+
+Arch Linux Live ISO (\l)
+\s-\r \m.
+Default logins "root" and "arch" have no password.
+To begin installation, login as root.
diff --git a/iso/overlay/etc/motd b/iso/overlay/etc/motd
new file mode 100644
index 0000000..00e4775
--- /dev/null
+++ b/iso/overlay/etc/motd
@@ -0,0 +1,13 @@
+**************************************************************
+* To begin installation, run /arch/setup *
+* You can find documentation at *
+* /usr/share/aif/docs/official_installation_guide_en *
+* *
+* i18n: Use the 'km' utility to change your keyboard layout *
+* and console font. *
+* *
+* If you are looking to install Arch on something more *
+* exotic, such as your kerosene-powered cheese grater, *
+* please consult http://wiki.archlinux.org. *
+* *
+**************************************************************
diff --git a/iso/overlay/etc/pacman.conf b/iso/overlay/etc/pacman.conf
new file mode 100644
index 0000000..911c23d
--- /dev/null
+++ b/iso/overlay/etc/pacman.conf
@@ -0,0 +1,84 @@
+#
+# /etc/pacman.conf
+#
+# See the pacman.conf(5) manpage for option and repository directives
+
+#
+# GENERAL OPTIONS
+#
+[options]
+# The following paths are commented out with their default values listed.
+# If you wish to use different paths, uncomment and update the paths.
+#RootDir = /
+#DBPath = /var/lib/pacman/
+#CacheDir = /var/cache/pacman/pkg/
+#LogFile = /var/log/pacman.log
+HoldPkg = pacman glibc
+# If upgrades are available for these packages they will be asked for first
+SyncFirst = pacman
+#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
+#XferCommand = /usr/bin/curl -C - %u > %o
+#CleanMethod = KeepInstalled
+Architecture = auto
+
+# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
+#IgnorePkg =
+#IgnoreGroup =
+
+#NoUpgrade =
+#NoExtract =
+
+# Misc options (all disabled by default)
+#UseSyslog
+#ShowSize
+#UseDelta
+#TotalDownload
+
+#
+# REPOSITORIES
+# - can be defined here or included from another file
+# - pacman will search repositories in the order defined here
+# - local/custom mirrors can be added here or in separate files
+# - repositories listed first will take precedence when packages
+# have identical names, regardless of version number
+# - URLs will have $repo replaced by the name of the current repo
+# - URLs will have $arch replaced by the name of the architecture
+#
+# Repository entries are of the format:
+# [repo-name]
+# Server = ServerName
+# Include = IncludePath
+#
+# The header [repo-name] is crucial - it must be present and
+# uncommented to enable the repo.
+#
+
+# The testing repositories are disabled by default. To enable, uncomment the
+# repo name header and Include lines. You can add preferred servers immediately
+# after the header, and they will be used before the default mirrors.
+
+#[testing]
+## Add your preferred servers here, they will be used first
+#Include = /etc/pacman.d/mirrorlist
+
+[core]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+[extra]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+#[community-testing]
+## Add your preferred servers here, they will be used first
+#Include = /etc/pacman.d/mirrorlist
+
+[community]
+# Add your preferred servers here, they will be used first
+Include = /etc/pacman.d/mirrorlist
+
+# An example of a custom package repository. See the pacman manpage for
+# tips on creating your own repositories.
+#[custom]
+#Server = file:///home/custompkgs
+
diff --git a/iso/overlay/etc/pam.d/su b/iso/overlay/etc/pam.d/su
new file mode 100644
index 0000000..a291042
--- /dev/null
+++ b/iso/overlay/etc/pam.d/su
@@ -0,0 +1,6 @@
+#%PAM-1.0
+auth sufficient pam_rootok.so
+auth sufficient pam_wheel.so trust use_uid
+auth required pam_unix.so
+account required pam_unix.so
+session required pam_unix.so
diff --git a/iso/overlay/etc/rc.conf b/iso/overlay/etc/rc.conf
new file mode 100644
index 0000000..ff18456
--- /dev/null
+++ b/iso/overlay/etc/rc.conf
@@ -0,0 +1,25 @@
+#
+# /etc/rc.conf - Main Configuration for Arch Linux
+
+. /etc/archiso/functions
+
+LOCALE_DEFAULT="en_US.UTF-8"
+CLOCK_DEFAULT=""
+TIMEZONE_DEFAULT=""
+KEYMAP_DEFAULT="us"
+
+LOCALE="$(cmdline_param locale ${LOCALE_DEFAULT})"
+HARDWARECLOCK="$(cmdline_param clock ${CLOCK_DEFAULT})"
+TIMEZONE="$(cmdline_param timezone ${TIMEZONE_DEFAULT})"
+KEYMAP="$(cmdline_param keymap ${KEYMAP_DEFAULT})"
+CONSOLEFONT="$(cmdline_param consolefont)"
+CONSOLEMAP="$(cmdline_param consolemap)"
+USECOLOR="yes"
+
+MOD_AUTOLOAD="yes"
+
+HOSTNAME="archiso"
+
+#TODO add more auto-daemons here, especially the live-cd specific stuff
+DAEMONS=(syslog-ng network archiso)
+#TODO: auto-network find-disks find-user-home
diff --git a/iso/overlay/etc/rc.d/archiso b/iso/overlay/etc/rc.d/archiso
new file mode 100755
index 0000000..435152a
--- /dev/null
+++ b/iso/overlay/etc/rc.d/archiso
@@ -0,0 +1,96 @@
+# vim: set ft=sh:
+. /etc/rc.conf
+. /etc/rc.d/functions
+. /etc/archiso/functions
+
+
+scan_network ()
+{
+ netparam () { echo ${2} | sed "s|.*${1}\([^ ]*\).*|\1|gi"; }
+ #
+ netdevs=$(cat /proc/net/dev | grep ':' | cut -d':' -f1)
+ for net in ${netdev}; do
+ stats=$(ifconfig ${net} | tr -s "\n" " ")
+ done
+}
+
+scan_mount_pts ()
+{
+ #iterate over all block devices
+ stat_busy "Scanning local block devices"
+ for dev in $(echo /sys/block/*/dev /sys/block/*/*/dev); do
+
+ 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
+
+ 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...
+ esac
+
+ echo "${devname} ${mountpt} ${fstype} ${options} 0 0 #configured by archiso" >>/etc/fstab
+ done
+ stat_done
+}
+
+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)"
+ if [ -e "${swapdev}" ]; then
+ swapon ${swapdev}
+ echo "${swapdev} swap swap defaults 0 0 #configured by archiso" >>/etc/fstab
+ fi
+ stat_done
+}
+
+do_homedir ()
+{
+ stat_busy "Scanning for existing HOME directory"
+ user="$(cmdline_param homeuser)"
+ for hdir in $(find /mnt -name "home/${user}" 2>/dev/null); do
+ mkdir -p "/home/arch/"
+ # break after the first success...
+ mount --bind "${hdir}" "/home/arch/" && break
+ done
+ stat_done
+}
+
+do_makeuser ()
+{
+ stat_busy "Making the default user arch"
+ addgroups="audio,disk,optical,wheel"
+ useradd -m -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 > /dev/null
+ stat_done
+}
+
+# GIT does not manage perms others thans 755 and 644, so fix here.
+do_fix_perms ()
+{
+ stat_busy "Fixing file permissions..."
+ chmod 440 /etc/sudoers
+ stat_done
+}
+
+case "$1" in
+ start)
+ do_locale_gen
+ do_makeuser
+ do_fix_perms
+ ;;
+esac
+exit 0
diff --git a/iso/overlay/etc/sudoers b/iso/overlay/etc/sudoers
new file mode 100644
index 0000000..67b20ba
--- /dev/null
+++ b/iso/overlay/etc/sudoers
@@ -0,0 +1,2 @@
+root ALL=(ALL) ALL
+%wheel ALL=(ALL) NOPASSWD: ALL