123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591 |
- diff --git a/Makefile b/Makefile
- index 4b4abba..7d6671e 100644
- --- a/Makefile
- +++ b/Makefile
- @@ -3,15 +3,15 @@
- VERSION = $(shell if test -f VERSION; then cat VERSION; else git describe | sed 's/-/./g;s/^v//;'; fi)
-
- DIRS = \
- - /usr/bin \
- + /sbin \
- /usr/share/bash-completion/completions \
- /usr/share/zsh/site-functions \
- /etc/mkinitcpio.d \
- /etc/initcpio/hooks \
- /etc/initcpio/install \
- - /usr/lib/initcpio/hooks \
- - /usr/lib/initcpio/install \
- - /usr/lib/initcpio/udev \
- + /lib/initcpio/hooks \
- + /lib/initcpio/install \
- + /lib/initcpio/udev \
- /usr/share/man/man8 \
- /usr/share/man/man5 \
- /usr/share/man/man1 \
- @@ -32,25 +32,25 @@ install: all
- install -dm755 $(addprefix $(DESTDIR),$(DIRS))
-
- sed -e 's|\(^_f_config\)=.*|\1=/etc/mkinitcpio.conf|' \
- - -e 's|\(^_f_functions\)=.*|\1=/usr/lib/initcpio/functions|' \
- - -e 's|\(^_d_hooks\)=.*|\1=/etc/initcpio/hooks:/usr/lib/initcpio/hooks|' \
- - -e 's|\(^_d_install\)=.*|\1=/etc/initcpio/install:/usr/lib/initcpio/install|' \
- + -e 's|\(^_f_functions\)=.*|\1=/lib/initcpio/functions|' \
- + -e 's|\(^_d_hooks\)=.*|\1=/etc/initcpio/hooks:/lib/initcpio/hooks|' \
- + -e 's|\(^_d_install\)=.*|\1=/etc/initcpio/install:/lib/initcpio/install|' \
- -e 's|\(^_d_presets\)=.*|\1=/etc/mkinitcpio.d|' \
- -e 's|%VERSION%|$(VERSION)|g' \
- - < mkinitcpio > $(DESTDIR)/usr/bin/mkinitcpio
- + < mkinitcpio > $(DESTDIR)/sbin/mkinitcpio
-
- - sed -e 's|\(^_f_functions\)=.*|\1=/usr/lib/initcpio/functions|' \
- + sed -e 's|\(^_f_functions\)=.*|\1=/lib/initcpio/functions|' \
- -e 's|%VERSION%|$(VERSION)|g' \
- - < lsinitcpio > $(DESTDIR)/usr/bin/lsinitcpio
- + < lsinitcpio > $(DESTDIR)/sbin/lsinitcpio
-
- - chmod 755 $(DESTDIR)/usr/bin/lsinitcpio $(DESTDIR)/usr/bin/mkinitcpio
- + chmod 755 $(DESTDIR)/sbin/lsinitcpio $(DESTDIR)/sbin/mkinitcpio
-
- install -m644 mkinitcpio.conf $(DESTDIR)/etc/mkinitcpio.conf
- - install -m755 -t $(DESTDIR)/usr/lib/initcpio init shutdown
- - install -m644 -t $(DESTDIR)/usr/lib/initcpio init_functions functions
- - install -m644 udev/01-memdisk.rules $(DESTDIR)/usr/lib/initcpio/udev/01-memdisk.rules
- + install -m755 -t $(DESTDIR)/lib/initcpio init shutdown
- + install -m644 -t $(DESTDIR)/lib/initcpio init_functions functions
- + install -m644 udev/01-memdisk.rules $(DESTDIR)/lib/initcpio/udev/01-memdisk.rules
-
- - cp -at $(DESTDIR)/usr/lib/initcpio hooks install
- + cp -at $(DESTDIR)/lib/initcpio hooks install
- install -m644 -t $(DESTDIR)/usr/share/mkinitcpio mkinitcpio.d/*
-
- install -m644 man/mkinitcpio.8 $(DESTDIR)/usr/share/man/man8/mkinitcpio.8
- diff --git a/functions b/functions
- index 4afc902..0fab375 100644
- --- a/functions
- +++ b/functions
- @@ -651,19 +651,12 @@ initialize_buildroot() {
- fi
-
- # base directory structure
- - install -dm755 "$buildroot"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local,lib,bin}}
- - ln -s "usr/lib" "$buildroot/lib"
- - ln -s "../lib" "$buildroot/usr/local/lib"
- - ln -s "bin" "$buildroot/usr/sbin"
- - ln -s "usr/bin" "$buildroot/bin"
- - ln -s "usr/bin" "$buildroot/sbin"
- - ln -s "../bin" "$buildroot/usr/local/bin"
- - ln -s "../bin" "$buildroot/usr/local/sbin"
- + install -dm755 "$buildroot"/{new_root,proc,sys,dev,run,tmp,etc,usr/{local/{lib,{,s}bin},lib,{,s}bin},lib,{,s}bin}
-
- case $arch in
- x86_64)
- - ln -s "lib" "$buildroot/usr/lib64"
- - ln -s "usr/lib" "$buildroot/lib64"
- + ln -s "lib" "$buildroot/usr/lib64"
- + ln -s "lib" "$buildroot/lib64"
- ;;
- esac
-
- @@ -671,7 +664,7 @@ initialize_buildroot() {
- printf '%s' "$version" >"$buildroot/VERSION"
-
- # kernel module dir
- - [[ $kernver != none ]] && install -dm755 "$buildroot/usr/lib/modules/$kernver/kernel"
- + [[ $kernver != none ]] && install -dm755 "$buildroot/lib/modules/$kernver/kernel"
-
- # mount tables
- ln -s /proc/self/mounts "$buildroot/etc/mtab"
- diff --git a/hooks/consolefont b/hooks/consolefont
- index 118a10d..81f48ec 100644
- --- a/hooks/consolefont
- +++ b/hooks/consolefont
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_hook() {
- if [ -e /consolefont.psfu ]; then
- diff --git a/hooks/keymap b/hooks/keymap
- index a5ae9d0..05cadb8 100644
- --- a/hooks/keymap
- +++ b/hooks/keymap
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_hook() {
- if [ -e /keymap.bin ]; then
- diff --git b/hooks/lib b/hooks/lib
- new file mode 100644
- index 0000000..95cda53
- --- /dev/null
- +++ b/hooks/lib
- @@ -0,0 +1,22 @@
- +#!/bin/ash
- +
- +run_latehook() {
- + local lib_source mountopts passno realtab=/new_root/etc/fstab
- +
- + if [ -f "$realtab" ]; then
- + if lib_source=$(findmnt -snero source --tab-file="$realtab" -T /lib); then
- + mountopts=$(findmnt -snero options --tab-file="$realtab" -T /lib)
- +
- + # returning the passno column requires util-linux >= 2.23. for
- + # older versions which do not support this column, always fsck.
- + passno=$(findmnt -snero passno --tab-file="$realtab" -T /lib 2>/dev/null)
- + if [ -z "$passno" ] || [ "$passno" -gt 0 ]; then
- + fsck_device "$lib_source"
- + fi
- + msg ":: mounting '$lib_source' on /lib"
- + mount "$lib_source" /new_root/lib -o "$mountopts"
- + fi
- + fi
- +}
- +
- +# vim: set ft=sh ts=4 sw=4 et:
- diff --git a/hooks/memdisk b/hooks/memdisk
- index 62790b4..6e9ab4d 100644
- --- a/hooks/memdisk
- +++ b/hooks/memdisk
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_hook() {
- local disk
- diff --git a/hooks/resume b/hooks/resume
- index 04ca1aa..9addd89 100644
- --- a/hooks/resume
- +++ b/hooks/resume
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_hook () {
- local resumedev
- diff --git a/hooks/shutdown b/hooks/shutdown
- index ce64caf..5c16ea0 100644
- --- a/hooks/shutdown
- +++ b/hooks/shutdown
- @@ -1,7 +1,7 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_cleanuphook() {
- - rm -rf /usr/lib/modules
- + rm -rf /lib/modules
- cp -ax / /run/initramfs
- }
-
- diff --git a/hooks/sleep b/hooks/sleep
- index 72fc503..73fcb16 100644
- --- a/hooks/sleep
- +++ b/hooks/sleep
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- run_hook() {
- if [ -z "${sleeptime}" ] || ! [ "${sleeptime}" -gt 0 ]; then
- diff --git a/hooks/usr a/hooks/usr
- deleted file mode 100644
- index 44aebb2..0000000
- --- a/hooks/usr
- +++ /dev/null
- @@ -1,22 +0,0 @@
- -#!/usr/bin/ash
- -
- -run_latehook() {
- - local usr_source mountopts passno realtab=/new_root/etc/fstab
- -
- - if [ -f "$realtab" ]; then
- - if usr_source=$(findmnt -snero source --tab-file="$realtab" -T /usr); then
- - mountopts=$(findmnt -snero options --tab-file="$realtab" -T /usr)
- -
- - # returning the passno column requires util-linux >= 2.23. for
- - # older versions which do not support this column, always fsck.
- - passno=$(findmnt -snero passno --tab-file="$realtab" -T /usr 2>/dev/null)
- - if [ -z "$passno" ] || [ "$passno" -gt 0 ]; then
- - fsck_device "$usr_source"
- - fi
- - msg ":: mounting '$usr_source' on /usr"
- - mount "$usr_source" /new_root/usr -o "$mountopts"
- - fi
- - fi
- -}
- -
- -# vim: set ft=sh ts=4 sw=4 et:
- diff --git a/init b/init
- index 2cb3526..2fae5a7 100644
- --- a/init
- +++ b/init
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- udevd_running=0
- mount_handler=default_mount_handler
- @@ -73,6 +73,6 @@ rdlogger_stop
-
- exec env -i \
- "TERM=$TERM" \
- - /usr/bin/switch_root /new_root $init "$@"
- + /sbin/switch_root /new_root $init "$@"
-
- # vim: set ft=sh ts=4 sw=4 et:
- diff --git a/install/autodetect b/install/autodetect
- index 846aa3a..fecc7f3 100644
- --- a/install/autodetect
- +++ b/install/autodetect
- @@ -37,9 +37,9 @@ build() {
- fs_autodetect_failed=1
- fi
-
- - # detect filesystem for separate /usr
- - if usrfstype=$(findmnt -snero fstype -T '/usr'); then
- - add_if_avail "$usrfstype"
- + # detect filesystem for separate /lib
- + if libfstype=$(findmnt -snero fstype -T '/lib'); then
- + add_if_avail "$libfstype"
- fi
-
- # scan for md raid devices
- diff --git a/install/base b/install/base
- index 0d3954f..41f136e 100644
- --- a/install/base
- +++ b/install/base
- @@ -3,24 +3,41 @@
- build() {
- local applet
-
- - add_binary /usr/lib/initcpio/busybox /bin/busybox
- + add_binary /lib/initcpio/busybox /bin/busybox
-
- - for applet in $(/usr/lib/initcpio/busybox --list); do
- - add_symlink "/usr/bin/$applet" busybox
- + for applet in ash cat chgrp chmod chown cp dd df dmesg echo egrep false grep ip ipaddr iplink iproute iprule \
- + kbd_mode kill less ln ls mkdir mknod mktemp mountpoint mv netstat openvt ping ping6 ps pwd \
- + readlink rm rmdir sed setfont sh sleep sync touch true umount uname vi; do
- + add_symlink "/bin/$applet" busybox
- + done
- +
- + for applet in blkdiscard fstrim halt ifconfig init iptunnel losetup poweroff reboot route; do
- + add_symlink "/sbin/$applet" ../bin/busybox
- + done
- +
- + for applet in \[ \[\[ awk basename clear cttyhack cut dirname du env expr fatattr free getopt head hexdump \
- + install killall loadfont loadkmap md5sum mkfifo mkpasswd nc nsenter nslookup pgrep pidof printf \
- + seq sha1sum sha256sum sha512sum shuf sort stat strings tac tail telnet test tftp truncate uniq \
- + unlink unshare uptime wc wget yes; do
- + add_symlink "/usr/bin/$applet" ../../bin/busybox
- + done
- +
- + for applet in chroot; do
- + add_symlink "/usr/sbin/$applet" ../../bin/busybox
- done
-
- # add kmod with applet symlinks
- add_binary kmod
- for applet in {dep,ins,rm,ls}mod mod{probe,info}; do
- - add_symlink "/usr/bin/$applet" kmod
- + add_symlink "/sbin/$applet" ../bin/kmod
- done
-
- add_binary blkid
- add_binary mount
- add_binary switch_root
-
- - add_file "/usr/lib/initcpio/init_functions" "/init_functions"
- - add_file "/usr/lib/initcpio/init" "/init"
- + add_file "/lib/initcpio/init_functions" "/init_functions"
- + add_file "/lib/initcpio/init" "/init"
- }
-
- help() {
- diff --git a/install/fsck b/install/fsck
- index d20750e..4321740 100644
- --- a/install/fsck
- +++ b/install/fsck
- @@ -6,22 +6,22 @@ build() {
- add_fsck() {
- if [[ $1 = ext[234] ]]; then
- add_binary fsck.ext4
- - add_symlink /usr/bin/fsck.ext2 fsck.ext4
- - add_symlink /usr/bin/fsck.ext3 fsck.ext4
- + add_symlink /sbin/fsck.ext2 fsck.ext4
- + add_symlink /sbin/fsck.ext3 fsck.ext4
- else
- add_binary "fsck.$1"
- fi
- }
-
- - if (( ! fs_autodetect_failed )) && [[ $rootfstype$usrfstype ]]; then
- + if (( ! fs_autodetect_failed )) && [[ $rootfstype$libfstype ]]; then
- if [[ $rootfstype ]]; then
- add_fsck $rootfstype && (( ++added ))
- fi
- - if [[ $usrfstype && $usrfstype != $rootfstype ]]; then
- - add_fsck $usrfstype && (( ++added ))
- + if [[ $libfstype && $libfstype != $rootfstype ]]; then
- + add_fsck $libfstype && (( ++added ))
- fi
- else
- - for fsck in /usr/bin/fsck.*; do
- + for fsck in /sbin/fsck.*; do
- [[ -f $fsck ]] || continue
- add_binary "$fsck" && (( ++added ))
- done
- diff --git b/install/lib b/install/lib
- new file mode 100644
- index 0000000..5805a64
- --- /dev/null
- +++ b/install/lib
- @@ -0,0 +1,16 @@
- +#!/bin/bash
- +
- +build() {
- + add_binary findmnt
- + add_runscript
- +}
- +
- +help() {
- + cat <<HELPEOF
- +This provides a support for mounting /lib via a late running hook. No
- +configuration is needed, as the mount options will be pulled directly from the
- +fstab on the real root device.
- +HELPEOF
- +}
- +
- +# vim: set ft=sh ts=4 sw=4 et:
- diff --git a/install/memdisk b/install/memdisk
- index 9b3577d..b3f0bfe 100644
- --- a/install/memdisk
- +++ b/install/memdisk
- @@ -4,7 +4,7 @@ build() {
- add_module 'phram'
- add_module 'mtdblock'
-
- - add_file /usr/lib/initcpio/udev/01-memdisk.rules /lib/udev/rules.d/01-memdisk.rules
- + add_file /lib/initcpio/udev/01-memdisk.rules /lib/udev/rules.d/01-memdisk.rules
- add_binary "memdiskfind"
-
- add_runscript
- diff --git a/install/modconf b/install/modconf
- index 06cb997..f2bcadc 100644
- --- a/install/modconf
- +++ b/install/modconf
- @@ -2,13 +2,13 @@
-
- build() {
- add_full_dir /etc/modprobe.d '*.conf'
- - add_full_dir /usr/lib/modprobe.d '*.conf'
- + add_full_dir /lib/modprobe.d '*.conf'
- }
-
- help() {
- cat <<HELPEOF
- This hook installs modprobe configuration files from /etc/modprobe.d and
- -/usr/lib/modprobe.d.
- +/lib/modprobe.d.
- HELPEOF
- }
-
- diff --git a/install/shutdown b/install/shutdown
- index 1de2f1f..e570d15 100644
- --- a/install/shutdown
- +++ b/install/shutdown
- @@ -5,7 +5,7 @@ build() {
- add_binary lsblk
- add_binary findmnt
- add_binary umount
- - add_file "/usr/lib/initcpio/shutdown" "/shutdown" 755
- + add_file "/lib/initcpio/shutdown" "/shutdown" 755
-
- add_runscript
- }
- @@ -13,7 +13,7 @@ build() {
- help() {
- cat <<HELPEOF
- This hook copies the contents of the initramfs into /run/initramfs for reuse
- -on shutdown. This is needed when you have /usr mounted on a separate partition.
- +on shutdown. This is needed when you have /lib mounted on a separate partition.
- HELPEOF
- }
-
- diff --git a/install/usr a/install/usr
- deleted file mode 100644
- index cdd3ca6..0000000
- --- a/install/usr
- +++ /dev/null
- @@ -1,16 +0,0 @@
- -#!/bin/bash
- -
- -build() {
- - add_binary findmnt
- - add_runscript
- -}
- -
- -help() {
- - cat <<HELPEOF
- -This provides a support for mounting /usr via a late running hook. No
- -configuration is needed, as the mount options will be pulled directly from the
- -fstab on the real root device.
- -HELPEOF
- -}
- -
- -# vim: set ft=sh ts=4 sw=4 et:
- diff --git a/lsinitcpio b/lsinitcpio
- index 7be0649..f57cf70 100755
- --- a/lsinitcpio
- +++ b/lsinitcpio
- @@ -163,11 +163,11 @@ analyze_image() {
- decomp "$_image" | bsdtar -C "$workdir" -xf - || die 'Failed to decompress image'
-
- # collect stats
- - kernver=("$workdir"/usr/lib/modules/*/)
- + kernver=("$workdir"/lib/modules/*/)
- kernver=${kernver%/}
- kernver=${kernver##*/}
-
- - modules=("$workdir/usr/lib/modules/$kernver"/kernel/*.ko*)
- + modules=("$workdir/lib/modules/$kernver"/kernel/*.ko*)
- if [[ -f ${modules[0]} ]]; then
- modules=("${modules[@]##*/}")
- modules=("${modules[@]%.ko*}")
- @@ -178,7 +178,7 @@ analyze_image() {
- foundhooks=("$workdir"/hooks/*)
- [[ -f ${foundhooks[0]} ]] && foundhooks=("${foundhooks[@]##*/}") || unset foundhooks
-
- - mapfile -t binaries < <(find "$workdir/usr/bin" -type f -printf %f\\n)
- + mapfile -t binaries < <(find "$workdir/"{,usr/}{,s}bin -type f -printf %f\\n)
-
- read -r version < "$workdir/VERSION"
-
- diff --git a/man/mkinitcpio.8 b/man/mkinitcpio.8
- index 41dd7b7..7e573c4 100644
- --- a/man/mkinitcpio.8
- +++ b/man/mkinitcpio.8
- @@ -383,12 +383,12 @@ Default configuration file for mkinitcpio\&.
- Directory containing mkinitcpio presets\&.
- .RE
- .PP
- -\fI/etc/initcpio/install\fR, \fI/usr/lib/initcpio/install\fR
- +\fI/etc/initcpio/install\fR, \fI/lib/initcpio/install\fR
- .RS 4
- Search path for build time hooks\&.
- .RE
- .PP
- -\fI/etc/initcpio/hooks\fR, \fI/usr/lib/initcpio/hooks\fR
- +\fI/etc/initcpio/hooks\fR, \fI/lib/initcpio/hooks\fR
- .RS 4
- Search path for early userspace runtime hooks\&.
- .RE
- diff --git a/man/mkinitcpio.8.txt b/man/mkinitcpio.8.txt
- index 5c3118e..2b2dcdc 100644
- --- a/man/mkinitcpio.8.txt
- +++ b/man/mkinitcpio.8.txt
- @@ -305,11 +305,11 @@ Files
- Directory containing mkinitcpio presets.
-
- '/etc/initcpio/install'::
- -'/usr/lib/initcpio/install'::
- +'/lib/initcpio/install'::
- Search path for build time hooks.
-
- '/etc/initcpio/hooks'::
- -'/usr/lib/initcpio/hooks'::
- +'/lib/initcpio/hooks'::
- Search path for early userspace runtime hooks.
-
- Examples
- diff --git a/mkinitcpio b/mkinitcpio
- index df011df..251cf2c 100755
- --- a/mkinitcpio
- +++ b/mkinitcpio
- @@ -12,9 +12,9 @@ shopt -s extglob
- # needed files/directories
- _f_functions=functions
- _f_config=mkinitcpio.conf
- -_d_hooks="$PWD/hooks:/usr/lib/initcpio/hooks:/lib/initcpio/hooks"
- -_d_install="$PWD/install:/usr/lib/initcpio/install:/lib/initcpio/install"
- -_d_firmware=({/usr,}/lib/firmware/updates {/usr,}/lib/firmware)
- +_d_hooks="$PWD/hooks:/lib/initcpio/hooks"
- +_d_install="$PWD/install:/lib/initcpio/install"
- +_d_firmware=(/lib/firmware/updates /lib/firmware)
- _d_presets=mkinitcpio.d
-
- # options and runtime data
- diff --git a/mkinitcpio.conf b/mkinitcpio.conf
- index c4d5e06..050cb92 100644
- --- a/mkinitcpio.conf
- +++ b/mkinitcpio.conf
- @@ -47,8 +47,8 @@ FILES=""
- ## This setup loads an lvm2 volume group on a usb device.
- # HOOKS="base udev block lvm2 filesystems"
- #
- -## NOTE: If you have /usr on a separate partition, you MUST include the
- -# usr, fsck and shutdown hooks.
- +## NOTE: If you have /lib on a separate partition, you MUST include the
- +# lib, fsck and shutdown hooks.
- HOOKS="base udev autodetect modconf block filesystems keyboard fsck"
-
- # COMPRESSION
- diff --git a/shell/bash-completion b/shell/bash-completion
- index a0f07dc..c99ac42 100644
- --- a/shell/bash-completion
- +++ b/shell/bash-completion
- @@ -72,7 +72,7 @@ _mkinitcpio() {
- -p|--preset)
- COMPREPLY=($(compgen -W "$(_files_from_dirs -s .preset /etc/mkinitcpio.d)" -- "$cur")) ;;
- -[AHS]|--add|--hookhelp|--skiphooks)
- - COMPREPLY=($(compgen -W "$(_files_from_dirs {/usr,}/lib/initcpio/install)" -- "$cur")) ;;
- + COMPREPLY=($(compgen -W "$(_files_from_dirs /lib/initcpio/install)" -- "$cur")) ;;
- *)
- COMPREPLY=($(compgen -W "${opts[*]}" -- "$cur")) ;;
- esac
- diff --git a/shell/zsh-completion b/shell/zsh-completion
- index 4d1e435..2cdb19f 100644
- --- a/shell/zsh-completion
- +++ b/shell/zsh-completion
- @@ -37,10 +37,10 @@ case $service in
- ;;
- mkinitcpio)
- _arguments : \
- - '(-A --addhooks)'{-A,--addhooks}'[Add specified hooks, comma separated, to image]::usr hooks:_path_files -W /usr/lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- + '(-A --addhooks)'{-A,--addhooks}'[Add specified hooks, comma separated, to image]::lib hooks:_path_files -W /lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- '(-c --config)'{-c,--config}'[Use alternate config file. (default: /etc/mkinitcpio.conf)]:config files:_files' \
- '(-g --generate)'{-g,--generate}'[Generate cpio image and write to specified path]:config files:_files' \
- - '(-H --hookhelp)'{-H,--hookhelp}'[Display help for given hook and exit]::usr hooks:_path_files -W /usr/lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- + '(-H --hookhelp)'{-H,--hookhelp}'[Display help for given hook and exit]::lib hooks:_path_files -W /lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- '(-h --help)'{-h,--help}'[Display this message and exit]' \
- '(-k --kernel)'{-k,--kernel}'[Use specified kernel version]:kernel versions:_find_kernel_versions' \
- '(-L --listhooks)'{-L,--listhooks}'[List all available hooks]' \
- @@ -48,7 +48,7 @@ case $service in
- '(-n --nocolor)'{-n,--nocolor}'[Disable colorized output messages]' \
- '(-p --preset)'{-p,--preset}'[Build specified preset from /etc/mkinitcpio.d]:presets:_files -g "*(\:r)" -W /etc/mkinitcpio.d' \
- '(-r --moduleroot)'{-r,--moduleroot}'[Root directory for modules (default: /)]:directories:_files -/' \
- - '(-S --skiphooks)'{-S,--skiphooks}'[Skip specified hooks, comma-separated, during build]::usr hooks:_path_files -W /usr/lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- + '(-S --skiphooks)'{-S,--skiphooks}'[Skip specified hooks, comma-separated, during build]::lib hooks:_path_files -W /lib/initcpio/install::lib hooks:_path_files -W /lib/initcpio/install' \
- '(-s --save)'{-s,--save}'[Save build directory. (default: no)]' \
- '(-t --builddir)'{-t,--builddir}'[Use DIR as the temporary build directory]:directories:_files -/' \
- '(-V --version)'{-V,--version}'[Display version information and exit]' \
- diff --git a/shutdown b/shutdown
- index 1f5fdc1..6d7dcdf 100644
- --- a/shutdown
- +++ b/shutdown
- @@ -1,4 +1,4 @@
- -#!/usr/bin/ash
- +#!/bin/ash
-
- # teardown a single device by node name
- # $1: device node name, e.g. md0, dm-2
- @@ -58,7 +58,7 @@ copy_binary_from_host() {
- # hardcode a sane PATH
- for p in '/usr/sbin' '/usr/bin' '/sbin' '/bin'; do
- if [ -e "/oldroot/$p/$bin" ]; then
- - cp "/oldroot/$p/$bin" "/usr/bin/$1"
- + cp "/oldroot/$p/$bin" "$p/$1"
- return 0
- fi
- done
|