Commit 27940c42 authored by Gerardo Exequiel Pozzi's avatar Gerardo Exequiel Pozzi
Browse files

[archiso] Misc style cleanups



* Add #!/bin/bash to install hooks and fixed vimlines.
* Removed empty variables.
* Reorder variables, adjust brace/parens in functions.
* Removed things implemented in base hook (/tmp, /etc/fstab).
Signed-off-by: default avatarGerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
parent c593c2bd
#!/bin/sh
#!/bin/ash
# /oldroot depends on things inside /oldroot/run/archiso...
mkdir /oldrun
......
build ()
{
MODULES="cdrom loop dm-snapshot"
#!/bin/bash
BINARIES=""
FILES=""
build() {
MODULES="cdrom loop dm-snapshot"
SCRIPT="archiso"
add_binary /lib/udev/cdrom_id
add_binary blockdev
......@@ -15,11 +14,6 @@ build ()
add_file /lib/udev/rules.d/10-dm.rules
add_file /lib/udev/rules.d/95-dm-notify.rules
add_file /lib/initcpio/udev/11-dm-initramfs.rules /lib/udev/rules.d/11-dm-initramfs.rules
# Add an empty fstab to avoid mount warning when -o remount is used (this should go to install/base)
: > "$BUILDROOT/etc/fstab"
SCRIPT="archiso"
}
# vim:ft=sh:ts=4:sw=4:et:
# vim: set ft=sh ts=4 sw=4 et:
# vim: set ft=sh:
build ()
{
MODULES=""
BINARIES=""
FILES=""
#!/bin/bash
build() {
SCRIPT="archiso_loop_mnt"
}
help ()
{
help() {
cat<<HELPEOF
This hook loads the necessary modules for boot via loop device.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
# vim: set ft=sh:
#!/bin/bash
build ()
{
build() {
MODULES="${MODULES} $(comm -2 -3 <(checked_modules "/drivers/net/" | sort) \
<(find $MODULEDIR/kernel/drivers/net/{irda,phy,wimax,wireless} \
-name '*.ko*' \
-exec bash -c 'printf "%s\n" "${@%%.ko*}" | sed "s@.*/@@;s@-@_@" | sort' _ {} +) \
| grep -v -e 'ppp_' -e 'plip' -e 'pppoe')"
BINARIES=""
FILES=""
SCRIPT="archiso_pxe_common"
# Add here for now, but this should go to "install/base".
add_dir /tmp
add_dir /etc
add_binary "/lib/initcpio/ipconfig" "/bin/ipconfig"
add_binary /lib/initcpio/ipconfig /bin/ipconfig
# Add hosts support files+dns
add_symlink /lib/libnss_files.so.2 $(readlink /lib/libnss_files.so.2)
add_binary $(readlink -f /lib/libnss_files.so.2)
add_symlink /lib/libnss_dns.so.2 $(readlink /lib/libnss_dns.so.2)
add_binary $(readlink -f /lib/libnss_dns.so.2)
add_dir /etc
echo "hosts: files dns" > $BUILDROOT/etc/nsswitch.conf
}
help ()
{
help() {
cat<<HELPEOF
This hook loads the necessary modules for boot via PXE.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
# vim: set ft=sh:
#!/bin/bash
build ()
{
MODULES=""
BINARIES=""
FILES=""
build() {
SCRIPT="archiso_pxe_http"
add_binary curl
}
help ()
{
help() {
cat<<HELPEOF
This hook loads the necessary modules for boot via PXE and HTTP.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
# vim: set ft=sh:
#!/bin/bash
build ()
{
build() {
MODULES="nbd"
BINARIES=""
FILES=""
SCRIPT="archiso_pxe_nbd"
add_binary nbd-client
add_file "/lib/initcpio/archiso_pxe_nbd" "/archiso_pxe_nbd"
add_file /lib/initcpio/archiso_pxe_nbd /archiso_pxe_nbd
}
help ()
{
help() {
cat<<HELPEOF
This hook loads the necessary modules for boot via PXE and NBD.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
# vim: set ft=sh:
#!/bin/bash
build() {
MODULES="nfs"
SCRIPT="archiso_pxe_nfs"
add_binary "/lib/initcpio/nfsmount" "/bin/nfsmount"
add_binary /lib/initcpio/nfsmount /bin/nfsmount
}
help() {
......@@ -12,3 +12,5 @@ help() {
This hook loads the necessary modules for boot via PXE and NFS.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
#!/bin/bash
build() {
SCRIPT="archiso_shutdown"
add_binary /lib/initcpio/archiso_shutdown /shutdown
add_file /lib/initcpio/archiso_shutdown /shutdown
}
help () {
help() {
cat <<HELPEOF
This hook will create a shutdown initramfs in /run/initramfs
that we can pivot to on shutdown in order to unmount / and
......@@ -11,3 +14,5 @@ and others mount points, dm-snapshot devices and loopback devices.
Mostly usefull for dm-snapshot persistent.
HELPEOF
}
# vim: set ft=sh ts=4 sw=4 et:
Supports Markdown
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