[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: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
c593c2bd24
commit
27940c420f
@ -1,4 +1,4 @@
|
|||||||
#!/bin/sh
|
#!/bin/ash
|
||||||
|
|
||||||
# /oldroot depends on things inside /oldroot/run/archiso...
|
# /oldroot depends on things inside /oldroot/run/archiso...
|
||||||
mkdir /oldrun
|
mkdir /oldrun
|
||||||
|
@ -1,9 +1,8 @@
|
|||||||
build ()
|
#!/bin/bash
|
||||||
{
|
|
||||||
MODULES="cdrom loop dm-snapshot"
|
|
||||||
|
|
||||||
BINARIES=""
|
build() {
|
||||||
FILES=""
|
MODULES="cdrom loop dm-snapshot"
|
||||||
|
SCRIPT="archiso"
|
||||||
|
|
||||||
add_binary /lib/udev/cdrom_id
|
add_binary /lib/udev/cdrom_id
|
||||||
add_binary blockdev
|
add_binary blockdev
|
||||||
@ -15,11 +14,6 @@ build ()
|
|||||||
add_file /lib/udev/rules.d/10-dm.rules
|
add_file /lib/udev/rules.d/10-dm.rules
|
||||||
add_file /lib/udev/rules.d/95-dm-notify.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_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:
|
||||||
|
@ -1,18 +1,13 @@
|
|||||||
# vim: set ft=sh:
|
#!/bin/bash
|
||||||
|
|
||||||
build ()
|
|
||||||
{
|
|
||||||
MODULES=""
|
|
||||||
|
|
||||||
BINARIES=""
|
|
||||||
FILES=""
|
|
||||||
|
|
||||||
|
build() {
|
||||||
SCRIPT="archiso_loop_mnt"
|
SCRIPT="archiso_loop_mnt"
|
||||||
}
|
}
|
||||||
|
|
||||||
help ()
|
help() {
|
||||||
{
|
|
||||||
cat<<HELPEOF
|
cat<<HELPEOF
|
||||||
This hook loads the necessary modules for boot via loop device.
|
This hook loads the necessary modules for boot via loop device.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
@ -1,33 +1,30 @@
|
|||||||
# vim: set ft=sh:
|
#!/bin/bash
|
||||||
|
|
||||||
build ()
|
build() {
|
||||||
{
|
|
||||||
MODULES="${MODULES} $(comm -2 -3 <(checked_modules "/drivers/net/" | sort) \
|
MODULES="${MODULES} $(comm -2 -3 <(checked_modules "/drivers/net/" | sort) \
|
||||||
<(find $MODULEDIR/kernel/drivers/net/{irda,phy,wimax,wireless} \
|
<(find $MODULEDIR/kernel/drivers/net/{irda,phy,wimax,wireless} \
|
||||||
-name '*.ko*' \
|
-name '*.ko*' \
|
||||||
-exec bash -c 'printf "%s\n" "${@%%.ko*}" | sed "s@.*/@@;s@-@_@" | sort' _ {} +) \
|
-exec bash -c 'printf "%s\n" "${@%%.ko*}" | sed "s@.*/@@;s@-@_@" | sort' _ {} +) \
|
||||||
| grep -v -e 'ppp_' -e 'plip' -e 'pppoe')"
|
| grep -v -e 'ppp_' -e 'plip' -e 'pppoe')"
|
||||||
BINARIES=""
|
|
||||||
FILES=""
|
|
||||||
SCRIPT="archiso_pxe_common"
|
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 hosts support files+dns
|
||||||
add_symlink /lib/libnss_files.so.2 $(readlink /lib/libnss_files.so.2)
|
add_symlink /lib/libnss_files.so.2 $(readlink /lib/libnss_files.so.2)
|
||||||
add_binary $(readlink -f /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_symlink /lib/libnss_dns.so.2 $(readlink /lib/libnss_dns.so.2)
|
||||||
add_binary $(readlink -f /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
|
echo "hosts: files dns" > $BUILDROOT/etc/nsswitch.conf
|
||||||
}
|
}
|
||||||
|
|
||||||
help ()
|
help() {
|
||||||
{
|
|
||||||
cat<<HELPEOF
|
cat<<HELPEOF
|
||||||
This hook loads the necessary modules for boot via PXE.
|
This hook loads the necessary modules for boot via PXE.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
@ -1,18 +1,15 @@
|
|||||||
# vim: set ft=sh:
|
#!/bin/bash
|
||||||
|
|
||||||
build ()
|
build() {
|
||||||
{
|
|
||||||
MODULES=""
|
|
||||||
BINARIES=""
|
|
||||||
FILES=""
|
|
||||||
SCRIPT="archiso_pxe_http"
|
SCRIPT="archiso_pxe_http"
|
||||||
|
|
||||||
add_binary curl
|
add_binary curl
|
||||||
}
|
}
|
||||||
|
|
||||||
help ()
|
help() {
|
||||||
{
|
|
||||||
cat<<HELPEOF
|
cat<<HELPEOF
|
||||||
This hook loads the necessary modules for boot via PXE and HTTP.
|
This hook loads the necessary modules for boot via PXE and HTTP.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
@ -1,20 +1,18 @@
|
|||||||
# vim: set ft=sh:
|
#!/bin/bash
|
||||||
|
|
||||||
build ()
|
build() {
|
||||||
{
|
|
||||||
MODULES="nbd"
|
MODULES="nbd"
|
||||||
BINARIES=""
|
|
||||||
FILES=""
|
|
||||||
SCRIPT="archiso_pxe_nbd"
|
SCRIPT="archiso_pxe_nbd"
|
||||||
|
|
||||||
add_binary nbd-client
|
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
|
cat<<HELPEOF
|
||||||
This hook loads the necessary modules for boot via PXE and NBD.
|
This hook loads the necessary modules for boot via PXE and NBD.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
# vim: set ft=sh:
|
#!/bin/bash
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
MODULES="nfs"
|
MODULES="nfs"
|
||||||
SCRIPT="archiso_pxe_nfs"
|
SCRIPT="archiso_pxe_nfs"
|
||||||
|
|
||||||
add_binary "/lib/initcpio/nfsmount" "/bin/nfsmount"
|
add_binary /lib/initcpio/nfsmount /bin/nfsmount
|
||||||
}
|
}
|
||||||
|
|
||||||
help() {
|
help() {
|
||||||
@ -12,3 +12,5 @@ help() {
|
|||||||
This hook loads the necessary modules for boot via PXE and NFS.
|
This hook loads the necessary modules for boot via PXE and NFS.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
SCRIPT="archiso_shutdown"
|
SCRIPT="archiso_shutdown"
|
||||||
add_binary /lib/initcpio/archiso_shutdown /shutdown
|
|
||||||
|
add_file /lib/initcpio/archiso_shutdown /shutdown
|
||||||
}
|
}
|
||||||
|
|
||||||
help () {
|
help() {
|
||||||
cat <<HELPEOF
|
cat <<HELPEOF
|
||||||
This hook will create a shutdown initramfs in /run/initramfs
|
This hook will create a shutdown initramfs in /run/initramfs
|
||||||
that we can pivot to on shutdown in order to unmount / and
|
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.
|
Mostly usefull for dm-snapshot persistent.
|
||||||
HELPEOF
|
HELPEOF
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# vim: set ft=sh ts=4 sw=4 et:
|
||||||
|
Loading…
Reference in New Issue
Block a user