summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.bashrc3
-rwxr-xr-xbin/yoda24
2 files changed, 15 insertions, 12 deletions
diff --git a/.bashrc b/.bashrc
index 8531984..4b95197 100644
--- a/.bashrc
+++ b/.bashrc
@@ -71,6 +71,9 @@ alias ya='rlwrap -pblue ./yaegi'
alias dya='YAEGI_AST_DOT=1 YAEGI_CFG_DOT=1 ./yaegi'
alias wai='~/go/src/github.co/containous/whoami/whoami'
+# yaegi debug
+export YAEGI_DOT_CMD='dotty -'
+
tfk() { ~/go/src/github.com/containous/traefik/traefik "$@"; }
export -f tfk
diff --git a/bin/yoda b/bin/yoda
index 5b329c5..a847d8f 100755
--- a/bin/yoda
+++ b/bin/yoda
@@ -4,7 +4,7 @@
version='yoda-0.1'
help() {
- echo 'usage: yoda [-CFV] [-H host] dev
+ echo 'usage: yoda [-CV] [-u user] dev
Install arch to a bootable dev. Media dev is entirely erased then
provisionned with an EFI boot partition and a root partition.
@@ -19,8 +19,6 @@ The following steps are performed:
options:
-C crypt root partition with dm-crypt+LUKS
--F format root filesystem without journal (USB-Flash)
--H host set hostnanme to host
-S steps skips some steps (i.e. -S 02 to avoid crypt)
-u user create user login and transfer ssh credentials
-V print version
@@ -163,7 +161,8 @@ EOT
DNSSEC=no
EOT
- packages="linux linux-firmware vi wireless_tools wpa_supplicant openssh arch-install-scripts"
+ packages="linux linux-firmware intel-ucode amd-ucode sudo vi wireless_tools
+wpa_supplicant openssh arch-install-scripts"
arch-chroot /mnt << EOT
locale-gen
@@ -178,7 +177,8 @@ EOT
cp "$myself" /mnt/usr/bin/yoda
if [ "$user" ]; then
useradd -R /mnt -m "$user"
- cp -a /home/$user/.ssh /mnt/home/$user/.ssh
+ cp -a "/home/$user/.ssh" "/mnt/home/$user/.ssh"
+ echo "$user ALL=(ALL) ALL" > "/mnt/etc/sudoers.d/01_$user"
fi
cat /etc/wpa_supplicant/wpa_supplicant*.conf > /mnt/etc/wpa_supplicant/wpa_supplicant-wlan0.conf
@@ -197,10 +197,12 @@ EOT
rdopt="rd.luks.name=$uid=root root=/dev/mapper/root"
fi
cat > /mnt/boot/loader/entries/arch.conf << EOT
-title Yoda Arch Linux
-linux /vmlinuz-linux
-initrd /initramfs-linux.img
-options $rdopt net.ifnames=0 rw
+title Yoda Arch Linux
+linux /vmlinuz-linux
+initrd /intel-ucode.img
+initrd /amd-ucode.img
+initrd /initramfs-linux.img
+option $rdopt net.ifnames=0 rw
EOT
}
@@ -215,9 +217,7 @@ cleanup() {
toskip='02'
while getopts :CFH:S:u:V opt; do
case $opt in
- (C) crypto=1 ;;
- (F) flash=1 ;;
- (H) hostname=$OPTARG ;;
+ (C) toskip=$(echo "$toskip" | sed 's/[02]//g') ;;
(S) toskip="$toskip$OPTARG" ;;
(u) user=$OPTARG;;
(V) echo $version && exit ;;