Permalink
Browse files

mkinitcpio install file

  • Loading branch information...
1 parent 6f97e2b commit 1b2b6e876804810c1abfeaf98be4ceb5b18b4a94 @falconindy committed Apr 19, 2011
Showing with 44 additions and 0 deletions.
  1. +44 −0 ubase
View
@@ -0,0 +1,44 @@
+install() {
+ # base filesystem structure
+ for dir in proc sys dev bin sbin usr{,/bin,/lib,/sbin} run; do
+ add_dir /$dir
+ done
+
+ # udev config
+ add_file /etc/udev/udev.conf
+ add_file /etc/modprobe.d/usb-load-ehci-first.conf
+
+ # udev rules
+ for rules in 50-firmware.rules 50-udev-default.rules 60-persistent-storage.rules 80-drivers.rules; do
+ add_file /lib/udev/rules.d/$rules
+ done
+
+ # udev tools
+ for tool in firmware ata_id path_id scsi_id usb_id; do
+ add_file /lib/udev/$tool
+ done
+
+ # devices
+ add_device /dev/null c 1 3
+ add_device /dev/zero c 1 5
+ add_device /dev/console c 5 1
+ add_device /dev/mem c 1 1
+
+ # necessary binary tools
+ add_binary /lib/initcpio/cinit /init
+ add_binary /lib/initcpio/busybox /bin/busybox
+ for sbin in /sbin/{modprobe,blkid,udevd,udevadm}; do
+ add_binary $sbin
+ done
+
+ add_file "$CONFIG" /config
+}
+
+help() {
+cat <<HELPEOF
+ This hook sets up all initial directories and installs base utilities,
+ including udev.
+HELPEOF
+}
+
+# vim: set et sw=2 ft=sh:

0 comments on commit 1b2b6e8

Please sign in to comment.