mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-19 19:40:37 +02:00
'upgpkg: update to duke release'
This commit is contained in:
parent
268f513a94
commit
7c01471100
19 changed files with 234 additions and 65 deletions
2
etc/init
2
etc/init
|
@ -18,7 +18,7 @@ export CMDLINE
|
||||||
# Used so hooks can override params to kinit
|
# Used so hooks can override params to kinit
|
||||||
export kinit_params=""
|
export kinit_params=""
|
||||||
export root=""
|
export root=""
|
||||||
echo "/bin/modprobe" > /proc/sys/kernel/modprobe
|
echo "/sbin/modprobe" > /proc/sys/kernel/modprobe
|
||||||
|
|
||||||
for cmd in $CMDLINE; do
|
for cmd in $CMDLINE; do
|
||||||
case "$cmd" in
|
case "$cmd" in
|
||||||
|
|
|
@ -40,6 +40,6 @@ if [ "${j}" != "" ] ; then
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
/bin/modprobe $1 > /dev/null 2>&1
|
/sbin/modprobe $1 > /dev/null 2>&1
|
||||||
|
|
||||||
# vim: set et ts=4:
|
# vim: set et ts=4:
|
||||||
|
|
|
@ -39,7 +39,7 @@ echo "Deactivating Swap ..."
|
||||||
/sbin/swapoff -a
|
/sbin/swapoff -a
|
||||||
|
|
||||||
echo "Unmounting Filesystems ..."
|
echo "Unmounting Filesystems ..."
|
||||||
/bin/umount -a
|
/bin/umount -a -t notmpfs,noramfs,nosysfs,noproc
|
||||||
|
|
||||||
# Power off or reboot
|
# Power off or reboot
|
||||||
if [ "$RUNLEVEL" = "0" ]; then
|
if [ "$RUNLEVEL" = "0" ]; then
|
||||||
|
|
11
etc/remote/rsync_xinetd
Normal file
11
etc/remote/rsync_xinetd
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
service rsync
|
||||||
|
{
|
||||||
|
socket_type = stream
|
||||||
|
wait = no
|
||||||
|
user = root
|
||||||
|
server = /usr/bin/rsync
|
||||||
|
server_args = --daemon
|
||||||
|
log_on_success += HOST DURATION
|
||||||
|
log_on_failure += HOST
|
||||||
|
disable = yes
|
||||||
|
}
|
16
etc/remote/rsyncd.conf
Normal file
16
etc/remote/rsyncd.conf
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
uid = nobody
|
||||||
|
gid = nobody
|
||||||
|
use chroot = no
|
||||||
|
max connections = 4
|
||||||
|
syslog facility = local5
|
||||||
|
pid file = /var/run/rsyncd.pid
|
||||||
|
|
||||||
|
[ftp]
|
||||||
|
path = /home/ftp
|
||||||
|
comment = ftp area
|
||||||
|
|
||||||
|
#[cvs]
|
||||||
|
# path = /data/cvs
|
||||||
|
# comment = CVS repository (requires authentication)
|
||||||
|
# auth users = tridge, susan
|
||||||
|
# secrets file = /etc/rsyncd.secrets
|
|
@ -199,7 +199,8 @@ KERNEL=="ram[0-9]*", NAME="rd/%n", SYMLINK+="%k"
|
||||||
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
|
KERNEL=="fb[0-9]*", NAME="fb/%n", SYMLINK+="%k", GROUP="video"
|
||||||
|
|
||||||
# misc
|
# misc
|
||||||
KERNEL=="rtc", NAME="misc/%k", SYMLINK+="%k", GROUP="audio", MODE="0664"
|
KERNEL=="rtc*", NAME="misc/%k", SYMLINK+="%k", GROUP="audio", MODE="0664"
|
||||||
|
KERNEL=="rtc0", SYMLINK+="rtc"
|
||||||
KERNEL=="nvram", NAME="misc/%k", SYMLINK+="%k"
|
KERNEL=="nvram", NAME="misc/%k", SYMLINK+="%k"
|
||||||
KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k"
|
KERNEL=="psaux", NAME="misc/%k", SYMLINK+="%k"
|
||||||
KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" GROUP="video"
|
KERNEL=="agpgart", NAME="misc/%k", SYMLINK+="%k" GROUP="video"
|
||||||
|
@ -309,18 +310,27 @@ SUBSYSTEM=="usb_device", ACTION=="add", PROGRAM="/bin/sh -c 'K=%k; K=$${K#usbdev
|
||||||
# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
|
# persistent storage links: /dev/{disk,tape}/{by-id,by-uuid,by-label,by-path,by-name}
|
||||||
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
|
# scheme based on "Linux persistent device names", 2004, Hannes Reinecke <hare@suse.de>
|
||||||
|
|
||||||
ACTION=="add|change", SUBSYSTEM=="block", GOTO="persistent_do"
|
# do not change that !!!
|
||||||
GOTO="persistent_end"
|
ACTION!="add|change", GOTO="persistent_storage_end"
|
||||||
LABEL="persistent_do"
|
|
||||||
|
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
|
||||||
|
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode"
|
||||||
|
KERNEL=="nst[0-9]", SUBSYSTEMS=="scsi", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
|
||||||
|
|
||||||
|
# type 8 devices are "Medium Changers"
|
||||||
|
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
|
||||||
|
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode"
|
||||||
|
KERNEL=="sg*", SUBSYSTEMS=="scsi", ATTRS{type}=="8", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}"
|
||||||
|
|
||||||
|
SUBSYSTEM!="block", GOTO="persistent_storage_end"
|
||||||
|
|
||||||
# skip rules for inappropriate block devices
|
# skip rules for inappropriate block devices
|
||||||
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|md*", GOTO="persistent_end"
|
# do not add dm-* !!!
|
||||||
|
KERNEL=="ram*|loop*|fd*|nbd*|gnbd*|md*", GOTO="persistent_storage_end"
|
||||||
|
|
||||||
# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
|
# never access non-cdrom removable ide devices, the drivers are causing event loops on open()
|
||||||
|
KERNEL=="hd*[!0-9]", ATTR{removable}=="1", DRIVERS=="ide-cs|ide-floppy", GOTO="persistent_storage_end"
|
||||||
KERNEL=="hd*[!0-9]", ATTRS{removable}=="1", DRIVERS=="ide-cs", GOTO="persistent_end"
|
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_storage_end"
|
||||||
KERNEL=="hd*[!0-9]", ATTRS{removable}=="1", DRIVERS=="ide-floppy", GOTO="persistent_end"
|
|
||||||
KERNEL=="hd*[0-9]", ATTRS{removable}=="1", GOTO="persistent_end"
|
|
||||||
|
|
||||||
# for partitions import parent information
|
# for partitions import parent information
|
||||||
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
|
KERNEL=="*[0-9]", IMPORT{parent}="ID_*"
|
||||||
|
@ -334,33 +344,48 @@ KERNEL=="sd*[!0-9]|sr*|st*", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{iee
|
||||||
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id -x"
|
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/usb_id -x"
|
||||||
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
|
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -s %p -d $tempnode"
|
||||||
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode"
|
KERNEL=="sd*[!0-9]|sr*|st*", ENV{ID_SERIAL}=="", IMPORT{program}="/lib/udev/scsi_id -g -x -a -s %p -d $tempnode"
|
||||||
KERNEL=="sd*[!0-9]|sr*|dasd*[!0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}"
|
KERNEL=="sd*[!0-9]|sr*", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}"
|
||||||
KERNEL=="sd*[0-9]|dasd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-part%n"
|
KERNEL=="sd*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="disk/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}-part%n"
|
||||||
KERNEL=="st*", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_SUBSYSTEMS}-$env{ID_SERIAL}"
|
|
||||||
|
# libata compat (links like hd*)
|
||||||
|
KERNEL=="sd*[!0-9]|sr*", ENV{ID_VENDOR}=="ATA", PROGRAM="/lib/udev/ata_id $tempnode", ENV{ID_ATA_COMPAT}="$result"
|
||||||
|
KERNEL=="sd*[!0-9]|sr*", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}"
|
||||||
|
KERNEL=="sd*[0-9]", ENV{ID_ATA_COMPAT}=="?*", SYMLINK+="disk/by-id/ata-$env{ID_ATA_COMPAT}-part%n"
|
||||||
|
|
||||||
KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
|
KERNEL=="mmcblk[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}"
|
||||||
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
|
KERNEL=="mmcblk[0-9]p[0-9]", ATTR{name}=="?*", ATTR{serial}=="?*", ENV{ID_NAME}="$attr{name}", ENV{ID_SERIAL}="$attr{serial}", SYMLINK+="disk/by-id/mmc-$env{ID_NAME}_$env{ID_SERIAL}-part%n"
|
||||||
|
|
||||||
|
|
||||||
# by-path (shortest physical path)
|
# by-path (shortest physical path)
|
||||||
### Broken at the moment
|
KERNEL=="*[!0-9]|sr*", IMPORT{program}="/lib/udev/path_id %p", SYMLINK+="disk/by-path/$env{ID_PATH}"
|
||||||
#KERNEL=="*[!0-9]|sr*|st*", ENV{ID_TYPE}=="?*", IMPORT{program}="/lib/udev/path_id %p", #SYMLINK+="disk/by-path/$env{ID_PATH}"
|
KERNEL=="st*", IMPORT{program}="/lib/udev/path_id %p", SYMLINK+="tape/by-path/$env{ID_PATH}"
|
||||||
#KERNEL=="st*", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}"
|
KERNEL=="sr*|st*", GOTO="persistent_storage_end"
|
||||||
#KERNEL=="sr*|st*", GOTO="persistent_end"
|
KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
|
||||||
#KERNEL=="*[0-9]", IMPORT{parent}=="ID_*"
|
|
||||||
#KERNEL=="*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PATH}-part%n"
|
|
||||||
|
|
||||||
# by-label/by-uuid (filesystem properties)
|
# by-label/by-uuid (filesystem properties)
|
||||||
KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_end"
|
KERNEL=="*[!0-9]", ATTR{removable}=="1", GOTO="persistent_storage_end"
|
||||||
IMPORT{program}="/lib/udev/vol_id --export $tempnode"
|
IMPORT{program}="/lib/udev/vol_id --export $tempnode"
|
||||||
ENV{ID_FS_UUID}=="?*", ENV{ID_FS_USAGE}=="filesystem|other|crypto", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
|
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
|
||||||
ENV{ID_FS_LABEL_SAFE}=="?*", ENV{ID_FS_USAGE}=="filesystem|other", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
|
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
|
||||||
|
|
||||||
# BIOS Enhanced Disk Device
|
# BIOS Enhanced Disk Device
|
||||||
KERNEL=="*[!0-9]", IMPORT{program}="/lib/udev/edd_id --export $tempnode"
|
KERNEL=="*[!0-9]", IMPORT{program}="/lib/udev/edd_id --export $tempnode"
|
||||||
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
|
KERNEL=="*[!0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}"
|
||||||
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
|
KERNEL=="*[0-9]", ENV{ID_EDD}=="?*", SYMLINK+="disk/by-id/edd-$env{ID_EDD}-part%n"
|
||||||
|
|
||||||
LABEL="persistent_end"
|
LABEL="persistent_storage_end"
|
||||||
|
|
||||||
|
# md links hook into "change" events, when the array becomes available
|
||||||
|
KERNEL!="md[0-9]*", GOTO="md_end"
|
||||||
|
ACTION!="add|change", GOTO="md_end"
|
||||||
|
|
||||||
|
ATTR{md/array_state}=="|clear|inactive", GOTO="md_end"
|
||||||
|
IMPORT{program}="/lib/udev/vol_id --export $tempnode"
|
||||||
|
OPTIONS="link_priority=100"
|
||||||
|
ENV{ID_FS_USAGE}=="filesystem|other|crypto", ENV{ID_FS_UUID}=="?*", SYMLINK+="disk/by-uuid/$env{ID_FS_UUID}"
|
||||||
|
ENV{ID_FS_USAGE}=="filesystem|other", ENV{ID_FS_LABEL_SAFE}=="?*", SYMLINK+="disk/by-label/$env{ID_FS_LABEL_SAFE}"
|
||||||
|
|
||||||
|
LABEL="md_end"
|
||||||
|
# Persistant block device stuff - end
|
||||||
#####################################
|
#####################################
|
||||||
# Persistant block device stuff - end
|
# Persistant block device stuff - end
|
||||||
#####################################
|
#####################################
|
||||||
|
|
14
hooks/arch-acpi
Normal file
14
hooks/arch-acpi
Normal file
|
@ -0,0 +1,14 @@
|
||||||
|
run_hook ()
|
||||||
|
{
|
||||||
|
if [ -d /proc/acpi ]; then
|
||||||
|
echo "Loading standard ACPI modules"
|
||||||
|
ACPI_MODULES="ac battery button fan processor thermal"
|
||||||
|
# add disablemodules= from commandline to blacklist
|
||||||
|
k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')"
|
||||||
|
for n in ${ACPI_MODULES}; do
|
||||||
|
if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then
|
||||||
|
/sbin/modprobe $n > /dev/null 2>&1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
}
|
|
@ -1,24 +1,79 @@
|
||||||
|
# vim: set ft=sh:
|
||||||
# TODO this one needs some work to work with lots of different
|
# TODO this one needs some work to work with lots of different
|
||||||
# encryption schemes
|
# encryption schemes
|
||||||
run_hook ()
|
run_hook ()
|
||||||
{
|
{
|
||||||
/bin/modprobe -a -q dm-crypt >/dev/null 2>&1
|
/sbin/modprobe -a -q dm-crypt >/dev/null 2>&1
|
||||||
if [ -e "/sys/class/misc/device-mapper" ]; then
|
if [ -e "/sys/class/misc/device-mapper" ]; then
|
||||||
read dev_t < /sys/class/misc/device-mapper/dev
|
if [ ! -c "/dev/mapper/control" ]; then
|
||||||
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
|
read dev_t < /sys/class/misc/device-mapper/dev
|
||||||
|
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
|
||||||
|
fi
|
||||||
|
[ "${quiet}" = "y" ] && CSQUIET=">/dev/null"
|
||||||
|
|
||||||
if /usr/sbin/cryptsetup isLuks ${root} >/dev/null 2>&1; then
|
# Get keyfile if specified
|
||||||
echo ""
|
ckeyfile="/crypto_keyfile.bin"
|
||||||
echo "A password is required to access the root filesystem:"
|
if [ "x${cryptkey}" != "x" ]; then
|
||||||
|
set -- $(/bin/replace "${cryptkey}" ':'); ckdev=$1; ckarg1=$2; ckarg2=$3
|
||||||
#loop until we get a real password
|
try=10
|
||||||
while ! /usr/sbin/cryptsetup luksOpen ${root} root; do
|
echo "Waiting for ${ckdev} ..."
|
||||||
sleep 2;
|
while [ ! -b ${ckdev} -a ${try} -gt 0 ]; do
|
||||||
|
sleep 1
|
||||||
|
try=$((${try}-1))
|
||||||
done
|
done
|
||||||
if [ -e "/dev/mapper/root" ]; then
|
if [ -b ${ckdev} ]; then
|
||||||
export root="/dev/mapper/root"
|
case ${ckarg1} in
|
||||||
|
*[!0-9]*)
|
||||||
|
# Use a file on the device
|
||||||
|
# ckarg1 is not numeric: ckarg1=filesystem, ckarg2=path
|
||||||
|
mkdir /ckey
|
||||||
|
mount -r -t ${ckarg1} ${ckdev} /ckey
|
||||||
|
dd if=/ckey/${ckarg2} of=${ckeyfile} >/dev/null 2>&1
|
||||||
|
umount /ckey
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
# Read raw data from the block device
|
||||||
|
# ckarg1 is numeric: ckarg1=offset, ckarg2=length
|
||||||
|
dd if=${ckdev} of=${ckeyfile} bs=1 skip=${ckarg1} count=${ckarg2} >/dev/null 2>&1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
[ ! -f ${ckeyfile} ] && echo "Keyfile could not be opened. Reverting to passphrase."
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "${cryptdevice}" ]; then
|
||||||
|
set -- $(/bin/replace "${cryptdevice}" ':'); cryptdev="$1"; cryptname="$2";
|
||||||
|
else
|
||||||
|
cryptdev="${root}"
|
||||||
|
cryptname="root"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if /usr/sbin/cryptsetup isLuks ${cryptdev} >/dev/null 2>&1; then
|
||||||
|
dopassphrase=1
|
||||||
|
# If keyfile exists, try to use that
|
||||||
|
if [ -f ${ckeyfile} ]; then
|
||||||
|
if eval /usr/sbin/cryptsetup --key-file ${ckeyfile} luksOpen ${cryptdev} ${cryptname} ${CSQUIET}; then
|
||||||
|
dopassphrase=0
|
||||||
|
else
|
||||||
|
echo "Invalid keyfile. Reverting to passphrase."
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
# Ask for a passphrase
|
||||||
|
if [ ${dopassphrase} -gt 0 ]; then
|
||||||
|
echo ""
|
||||||
|
echo "A password is required to access the ${cryptname} volume:"
|
||||||
|
|
||||||
|
#loop until we get a real password
|
||||||
|
while ! eval /usr/sbin/cryptsetup luksOpen ${cryptdev} ${cryptname} ${CSQUIET}; do
|
||||||
|
sleep 2;
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -e "/dev/mapper/${cryptname}" ]; then
|
||||||
|
if [ "${cryptname}" = "root" ]; then
|
||||||
|
export root="/dev/mapper/root"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
err "Password succeeded, but root creation failed, aborting..."
|
err "Password succeeded, but ${cryptname} creation failed, aborting..."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
elif [ "x${crypto}" != "x" ]; then
|
elif [ "x${crypto}" != "x" ]; then
|
||||||
|
@ -27,17 +82,22 @@ run_hook ()
|
||||||
if [ $# -ne 5 ]; then
|
if [ $# -ne 5 ]; then
|
||||||
err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
|
err "Verify parameter format: crypto=hash:cipher:keysize:offset:skip"
|
||||||
err "Non-LUKS decryption not attempted..."
|
err "Non-LUKS decryption not attempted..."
|
||||||
else
|
return 1
|
||||||
exe="/usr/sbin/cryptsetup create root ${root}"
|
|
||||||
[ "x$(eval echo ${1})" != "x" ] && exe="$exe --hash \"$(eval echo ${1})\""
|
|
||||||
[ "x$(eval echo ${2})" != "x" ] && exe="$exe --cipher \"$(eval echo ${2})\""
|
|
||||||
[ "x$(eval echo ${3})" != "x" ] && exe="$exe --key-size \"$(eval echo ${3})\""
|
|
||||||
[ "x$(eval echo ${4})" != "x" ] && exe="$exe --offset \"$(eval echo ${4})\""
|
|
||||||
[ "x$(eval echo ${5})" != "x" ] && exe="$exe --skip \"$(eval echo ${5})\""
|
|
||||||
echo ""
|
|
||||||
echo "A password is required to access the root filesystem:"
|
|
||||||
eval "${exe}"
|
|
||||||
fi
|
fi
|
||||||
|
exe="/usr/sbin/cryptsetup create ${cryptname} ${cryptdev}"
|
||||||
|
[ "x$(eval echo ${1})" != "x" ] && exe="${exe} --hash \"$(eval echo ${1})\""
|
||||||
|
[ "x$(eval echo ${2})" != "x" ] && exe="${exe} --cipher \"$(eval echo ${2})\""
|
||||||
|
[ "x$(eval echo ${3})" != "x" ] && exe="${exe} --key-size \"$(eval echo ${3})\""
|
||||||
|
[ "x$(eval echo ${4})" != "x" ] && exe="${exe} --offset \"$(eval echo ${4})\""
|
||||||
|
[ "x$(eval echo ${5})" != "x" ] && exe="${exe} --skip \"$(eval echo ${5})\""
|
||||||
|
if [ -f ${ckeyfile} ]; then
|
||||||
|
exe="${exe} --key-file ${ckeyfile}"
|
||||||
|
else
|
||||||
|
exe="${exe} --verify-passphrase"
|
||||||
|
echo ""
|
||||||
|
echo "A password is required to access the ${cryptname} volume:"
|
||||||
|
fi
|
||||||
|
eval "${exe} ${CSQUIET}"
|
||||||
}
|
}
|
||||||
|
|
||||||
msg "Non-LUKS encrypted device found..."
|
msg "Non-LUKS encrypted device found..."
|
||||||
|
@ -47,14 +107,16 @@ run_hook ()
|
||||||
err "Non-LUKS device decryption failed. verify format: "
|
err "Non-LUKS device decryption failed. verify format: "
|
||||||
err " crypto=hash:cipher:keysize:offset:skip"
|
err " crypto=hash:cipher:keysize:offset:skip"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
fi
|
||||||
if [ -e "/dev/mapper/root" ]; then
|
if [ -e "/dev/mapper/${cryptname}" ]; then
|
||||||
|
if [ "${cryptname}" = "root" ]; then
|
||||||
export root="/dev/mapper/root"
|
export root="/dev/mapper/root"
|
||||||
else
|
|
||||||
err "Password succeeded, but root creation failed, aborting..."
|
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
|
else
|
||||||
|
err "Password succeeded, but ${cryptname} creation failed, aborting..."
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
nuke ${ckeyfile}
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ run_hook ()
|
||||||
echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter."
|
echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter."
|
||||||
else
|
else
|
||||||
kinit_params="${kinit_params} rootfstype=${FSTYPE}"
|
kinit_params="${kinit_params} rootfstype=${FSTYPE}"
|
||||||
/bin/modprobe -q "${FSTYPE}" >/dev/null 2>&1
|
/sbin/modprobe -q "${FSTYPE}" >/dev/null 2>&1
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
run_hook ()
|
run_hook ()
|
||||||
{
|
{
|
||||||
/bin/modprobe -aq floppy>/dev/null 2>&1
|
/sbin/modprobe -aq floppy>/dev/null 2>&1
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
run_hook ()
|
run_hook ()
|
||||||
{
|
{
|
||||||
/bin/modprobe -q dm-mod >/dev/null 2>&1
|
/sbin/modprobe -q dm-mod >/dev/null 2>&1
|
||||||
if [ -e "/sys/class/misc/device-mapper" ]; then
|
if [ -e "/sys/class/misc/device-mapper" ]; then
|
||||||
read dev_t < /sys/class/misc/device-mapper/dev
|
read dev_t < /sys/class/misc/device-mapper/dev
|
||||||
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
|
/bin/mknod "/dev/mapper/control" c $(/bin/replace "${dev_t}" ':')
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
run_hook ()
|
run_hook ()
|
||||||
{
|
{
|
||||||
#TODO scan for these somehow...
|
#TODO scan for these somehow...
|
||||||
/bin/modprobe -aq linear multipath raid0 raid1 raid456 raid10>/dev/null 2>&1
|
/sbin/modprobe -aq linear multipath raid0 raid1 raid456 raid10>/dev/null 2>&1
|
||||||
# md= can be specified multiple times. The simplistic commandline
|
# md= can be specified multiple times. The simplistic commandline
|
||||||
# parsing does not handle this, so we will let mdassemble parse it
|
# parsing does not handle this, so we will let mdassemble parse it
|
||||||
# create md devices for installation
|
# create md devices for installation
|
||||||
|
|
|
@ -14,7 +14,7 @@ FILES=""
|
||||||
# default is set to ftp install media
|
# default is set to ftp install media
|
||||||
#
|
#
|
||||||
# Please change the other hooks only if you know what you are doing.
|
# Please change the other hooks only if you know what you are doing.
|
||||||
HOOKS="arch-ftp-install arch-bootmessage arch-motd arch-memtest arch-pam arch-shadow arch-base arch-hwdetect arch-udev ide pata scsi sata arch-net arch-isdn arch-pcmcia usb usbinput fw arch-floppy arch-raid arch-lvm2 arch-encrypt arch-filesystems arch-keymap arch-remote arch-cpufreq arch-fb arch-links arch-naim arch-pacman arch-addons arch-kexec arch-ppp arch-pppoe arch-lilo arch-grub arch-iptables arch-capi4k arch-pciutils arch-usbutils arch-openvpn arch-vpnc"
|
HOOKS="arch-ftp-install arch-acpi arch-bootmessage arch-motd arch-memtest arch-pam arch-shadow arch-base arch-hwdetect arch-udev ide pata scsi sata arch-net arch-isdn arch-pcmcia arch-rtc arch-sound usb usbinput fw arch-floppy arch-raid arch-lvm2 arch-encrypt arch-filesystems arch-keymap arch-remote arch-cpufreq arch-fb arch-links arch-naim arch-pacman arch-addons arch-kexec arch-ppp arch-pppoe arch-lilo arch-grub arch-iptables arch-capi4k arch-pciutils arch-usbutils arch-openvpn arch-vpnc"
|
||||||
#
|
#
|
||||||
# adding pxelinux hook if mkpxelinux is used.
|
# adding pxelinux hook if mkpxelinux is used.
|
||||||
if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then
|
if [ "${RUNPROGRAM}" = "mkpxelinux" ]; then
|
||||||
|
|
17
install/arch-acpi
Normal file
17
install/arch-acpi
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
|
|
||||||
|
install ()
|
||||||
|
{
|
||||||
|
MODULES=" $(checked_modules "/acpi/")"
|
||||||
|
|
||||||
|
BINARIES=""
|
||||||
|
FILES=""
|
||||||
|
SCRIPT="arch-acpi"
|
||||||
|
}
|
||||||
|
|
||||||
|
help ()
|
||||||
|
{
|
||||||
|
cat<<HELPEOF
|
||||||
|
This hook includes the acpi subsystem on an arch boot image.
|
||||||
|
HELPEOF
|
||||||
|
}
|
|
@ -22,14 +22,16 @@ install ()
|
||||||
done
|
done
|
||||||
|
|
||||||
### adding klibc binaries
|
### adding klibc binaries
|
||||||
for f in $(find /usr/lib/klibc/bin/ ! -name "mount" ! -name "umount" ! -name "reboot" ! -name "halt" ! -name "chroot" ! -name "sh" ! -name "modprobe" ! -type d); do
|
for f in $(find /usr/lib/klibc/bin/ ! -name "mount" ! -name "umount" ! -name "reboot" ! -name "halt" ! -name "chroot" ! -name "sh" ! -name "modprobe" ! -name "cat" ! -name "cpio" ! -name "dd" ! -name "gunzip" ! -name "gzip" ! -name "insmod" ! -name "zcat" ! -type d); do
|
||||||
add_file $f /bin/$(basename $f)
|
add_file $f /bin/$(basename $f)
|
||||||
done
|
done
|
||||||
|
|
||||||
### adding needed programs from running system
|
### adding needed programs from running system
|
||||||
add_file "${CONFIG}" "/config"
|
add_file "${CONFIG}" "/config"
|
||||||
SCRIPT="arch-base"
|
SCRIPT="arch-base"
|
||||||
BINARIES="init agetty mount modprobe modinfo umount basename du clear env head id md5sum nano netcat printf tail tee test tr tty uptime wc which whoami xargs yes syslog-ng bash swapon uniq cut seq snarf find sort fdisk sfdisk cfdisk gawk cp mv shutdown free ls rm sed test less chgrp chmod chown date df dialog dmesg egrep fgrep grep hostname kill killall killall5 more ps pwd rmdir stty sync tar touch uname vim lsmod modinfo rmmod hdparm true mktemp chroot dirname expr bzip2 hwclock depmod su"
|
BINARIES="init agetty mount modprobe modinfo umount basename du clear env head id md5sum nano netcat printf tail tee test tr tty uptime wc which whoami xargs yes syslog-ng bash swapon uniq cut seq snarf find sort fdisk sfdisk cfdisk gawk cp mv shutdown free ls rm sed test less chgrp chmod chown date df dialog dmesg egrep fgrep grep hostname kill killall killall5 more ps pwd rmdir stty sync tar touch uname vim lsmod modinfo rmmod hdparm true mktemp chroot dirname expr bzip2 hwclock depmod su cat cpio dd gzip"
|
||||||
|
add_file "/bin/gunzip"
|
||||||
|
add_file "/bin/zcat"
|
||||||
add_file "/usr/bin/reset"
|
add_file "/usr/bin/reset"
|
||||||
add_file "/sbin/swapoff"
|
add_file "/sbin/swapoff"
|
||||||
add_file "/sbin/halt"
|
add_file "/sbin/halt"
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
install ()
|
install ()
|
||||||
{
|
{
|
||||||
MODULES=""
|
MODULES=""
|
||||||
BINARIES="pacman"
|
BINARIES="pacman pacman.static"
|
||||||
FILES=""
|
FILES=""
|
||||||
SCRIPT=""
|
SCRIPT=""
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ syslog-ng sysvinit tar util-linux vim which wireless_tools xfsprogs dnsutils hdp
|
||||||
grub netkit-telnet openssh hwdetect portmap shadow bridge-utils ifenslave cpufrequtils links tcp_wrappers \
|
grub netkit-telnet openssh hwdetect portmap shadow bridge-utils ifenslave cpufrequtils links tcp_wrappers \
|
||||||
dosfstools udev initscripts filesystem kernel26 glibc kernel-headers xinetd naim links pacman screen kbd pam \
|
dosfstools udev initscripts filesystem kernel26 glibc kernel-headers xinetd naim links pacman screen kbd pam \
|
||||||
dhcpcd bzip2 gcc mktemp openssl zlib libelf gpm sysfsutils libgcrypt libgpg-error popt kexec-tools ppp libpcap \
|
dhcpcd bzip2 gcc mktemp openssl zlib libelf gpm sysfsutils libgcrypt libgpg-error popt kexec-tools ppp libpcap \
|
||||||
rp-pppoe lilo grub iptables capi4k-utils ntfs-3g isdn4k-utils pciutils usbutils vpnc openvpn bcm43xx-fwcutter wpa_supplicant"
|
rp-pppoe lilo grub iptables capi4k-utils ntfs-3g isdn4k-utils pciutils usbutils vpnc openvpn bcm43xx-fwcutter wpa_supplicant gzip rsync libarchive libdownload device-mapper"
|
||||||
|
|
||||||
for i in $DEPENDS; do
|
for i in $DEPENDS; do
|
||||||
add_file "$(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*/depends)"
|
add_file "$(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*/depends)"
|
||||||
|
|
|
@ -4,7 +4,7 @@ install ()
|
||||||
{
|
{
|
||||||
MODULES=" $(checked_modules "/drivers/net/") "
|
MODULES=" $(checked_modules "/drivers/net/") "
|
||||||
|
|
||||||
BINARIES="$(basename $(find /usr/bin/screen-*)) telnet tcpd ssh scp ssh-keygen sshd pmap_set pmap_dump portmap xinetd in.telnetd"
|
BINARIES="$(basename $(find /usr/bin/screen-*)) telnet tcpd ssh scp ssh-keygen sshd pmap_set pmap_dump portmap xinetd in.telnetd rsync"
|
||||||
FILES=""
|
FILES=""
|
||||||
SCRIPT="arch-remote"
|
SCRIPT="arch-remote"
|
||||||
add_file "/etc/archboot/etc/remote/hosts.allow" "/etc/hosts.allow"
|
add_file "/etc/archboot/etc/remote/hosts.allow" "/etc/hosts.allow"
|
||||||
|
@ -19,9 +19,12 @@ install ()
|
||||||
add_file "/etc/archboot/etc/remote/moduli_ssh" "/etc/ssh/moduli"
|
add_file "/etc/archboot/etc/remote/moduli_ssh" "/etc/ssh/moduli"
|
||||||
add_file "/etc/archboot/etc/remote/sshd_pam" "/etc/pam.d/sshd"
|
add_file "/etc/archboot/etc/remote/sshd_pam" "/etc/pam.d/sshd"
|
||||||
add_file "/etc/archboot/etc/remote/screen_pam" "/etc/pam.d/screen"
|
add_file "/etc/archboot/etc/remote/screen_pam" "/etc/pam.d/screen"
|
||||||
|
add_file "/etc/archboot/etc/remote/rsyncd.conf" "/etc/rsyncd.conf"
|
||||||
|
add_file "/etc/archboot/etc/remote/rsync_xinetd" "/etc/xinet.d/rsync"
|
||||||
add_file "/etc/rc.d/portmap"
|
add_file "/etc/rc.d/portmap"
|
||||||
add_file "/etc/rc.d/sshd"
|
add_file "/etc/rc.d/sshd"
|
||||||
add_file "/etc/rc.d/xinetd"
|
add_file "/etc/rc.d/xinetd"
|
||||||
|
add_file "/etc/rc.d/rsyncd"
|
||||||
add_dir "/var/empty"
|
add_dir "/var/empty"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
17
install/arch-rtc
Normal file
17
install/arch-rtc
Normal file
|
@ -0,0 +1,17 @@
|
||||||
|
# Created by Tobias Powalowski <tpowa@archlinux.org>
|
||||||
|
|
||||||
|
install ()
|
||||||
|
{
|
||||||
|
MODULES=" $(checked_modules "drivers/rtc/")"
|
||||||
|
|
||||||
|
BINARIES=""
|
||||||
|
FILES=""
|
||||||
|
SCRIPT=""
|
||||||
|
}
|
||||||
|
|
||||||
|
help ()
|
||||||
|
{
|
||||||
|
cat<<HELPEOF
|
||||||
|
This hook includes the rtc subsystem on an arch boot image.
|
||||||
|
HELPEOF
|
||||||
|
}
|
|
@ -3,7 +3,7 @@
|
||||||
install ()
|
install ()
|
||||||
{
|
{
|
||||||
MODULES=""
|
MODULES=""
|
||||||
BINARIES="udevd udevtrigger udevsettle"
|
BINARIES="udevd udevtrigger udevsettle dmsetup"
|
||||||
FILES=" /etc/udev/udev.conf"
|
FILES=" /etc/udev/udev.conf"
|
||||||
SCRIPT="arch-udev"
|
SCRIPT="arch-udev"
|
||||||
add_file /etc/archboot/etc/udev.rules /etc/udev/rules.d/udev.rules
|
add_file /etc/archboot/etc/udev.rules /etc/udev/rules.d/udev.rules
|
||||||
|
@ -18,6 +18,8 @@ install ()
|
||||||
add_file /lib/udev/scsi_id /lib/udev/scsi_id
|
add_file /lib/udev/scsi_id /lib/udev/scsi_id
|
||||||
add_file /lib/udev/usb_id /lib/udev/usb_id
|
add_file /lib/udev/usb_id /lib/udev/usb_id
|
||||||
add_file /lib/udev/vol_id /lib/udev/vol_id
|
add_file /lib/udev/vol_id /lib/udev/vol_id
|
||||||
|
add_file /lib/libvolume_id.so.0
|
||||||
|
add_file /etc/udev/rules.d/device-mapper.rules
|
||||||
# add persistent network and cd symlink support
|
# add persistent network and cd symlink support
|
||||||
# add_file /etc/udev/rules.d/75-cd-aliases-generator.rules
|
# add_file /etc/udev/rules.d/75-cd-aliases-generator.rules
|
||||||
# add_file /etc/udev/rules.d/75-persistent-net-generator.rules
|
# add_file /etc/udev/rules.d/75-persistent-net-generator.rules
|
||||||
|
|
Loading…
Reference in a new issue