summaryrefslogtreecommitdiffstats
path: root/ship/src/arch_autoinstall
diff options
context:
space:
mode:
authormakefu <github@syntax-fehler.de>2013-12-18 22:13:15 +0100
committermakefu <github@syntax-fehler.de>2013-12-18 22:13:15 +0100
commit3808b2300de3a1cfa25f0c878ce6ef25f96ff504 (patch)
tree4938a1ebad271ce2de36ca76191da727249c561e /ship/src/arch_autoinstall
parent1c627a1cb5979fd6925b9495b9b132b83f2166a2 (diff)
ship:arch_autoinstall add cups support
Diffstat (limited to 'ship/src/arch_autoinstall')
-rwxr-xr-xship/src/arch_autoinstall44
1 files changed, 32 insertions, 12 deletions
diff --git a/ship/src/arch_autoinstall b/ship/src/arch_autoinstall
index 95a72e26..8b2d50a9 100755
--- a/ship/src/arch_autoinstall
+++ b/ship/src/arch_autoinstall
@@ -4,10 +4,11 @@
#@include color
#@include network
pass=shackit
-extra_pkg="xorg vim xfce4 feh chromium zsh sudo git flashplugin alsa-oss alsa-lib alsa-utils grub-bios slim ntp tor network-manager-applet networkmanager openssh"
+shack_printer_ip=10.42.0.135
+extra_pkg="xorg vim xfce4 feh chromium zsh sudo git flashplugin alsa-oss alsa-lib alsa-utils grub-bios slim ntp tor network-manager-applet networkmanager openssh cups cups-filters"
info "writing stdout to /tmp/install.log"
-exec >>/tmp/install.log
+exec | tee -a /tmp/install.log
if find /dev/disk/by-label/ -name ARCH_\* |xargs readlink |grep sda; then
if test -e /dev/sdb; then
#todo: retest or something
@@ -75,7 +76,7 @@ info "generating configs"
genfstab -U -p /mnt > /mnt/etc/fstab
info "beginning chroot!"
-arch-chroot /mnt >>/tmp/install.log << EOF
+arch-chroot /mnt | tee -a /tmp/install.log << EOF
msg() { printf "\$*\n" >&2; }
info() { msg "$green\$*$nc"; }
@@ -101,16 +102,35 @@ printf "root ALL=(ALL) ALL\n%s ALL=(ALL) ALL\n" %wheel >> /etc/sudoers
info "configuring slim"
printf "default_user\tshack\nfocus_password\tyes\nauto_login\tyes\n" >> /etc/slim.conf
info "configuring .xinitrc"
-printf "nm-applet&\nexec startxfce4\n" >> /home/shack/.xinitrc
+printf "exec startxfce4\n" >> /home/shack/.xinitrc
+
+for i in slim NetworkManager ntpd tor cups; do
+ info "enabling \$i"
+ systemctl enable \$i
+done
+
+### CUPS
+mkdir -p /etc/cups
+cat >>/etc/cups/printers.conf<<EOF
+<Printer HP_LaserJet_5000_Series>
+Info Shack Printer HP 5000
+Location lounge
+MakeModel HP LaserJet Series PCL 6 CUPS
+DeviceURI socket://$shack_printer_ip
+State Idle
+StateTime 1387400063
+Type 8400964
+Accepting Yes
+Shared No
+JobSheets none none
+QuotaPeriod 0
+PageLimit 0
+KLimit 0
+OpPolicy default
+ErrorPolicy stop-printer
+</Printer>
+EOF
-info "enabling slim"
-systemctl enable slim
-info "enabling networkManager"
-systemctl enable NetworkManager
-info "enabling ntpd"
-systemctl enable ntpd
-info "enabling tor"
-systemctl enable tor
info "installing grub"
grub-install ${rootdisk} 2>/dev/null
echo "GRUB_DISABLE_LINUX_UUID=true" >> /etc/default/grub