From dd28dcf3d620a4ac7d0a1532b812213cf094cd3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 12 Jan 2022 02:26:25 +0100 Subject: Revert "Move webdav into profiles." It actually reverts the non-need for the nginx module webdav_ext. Since Omnifocus requires PROPFIND. This reverts commit edf6ffe8b399679ba28cc5e558a6838919dd1ee8. --- modules/syslinux/manifests/init.pp | 119 ------------------------------------- 1 file changed, 119 deletions(-) delete mode 100644 modules/syslinux/manifests/init.pp (limited to 'modules/syslinux/manifests/init.pp') diff --git a/modules/syslinux/manifests/init.pp b/modules/syslinux/manifests/init.pp deleted file mode 100644 index 8428b5c..0000000 --- a/modules/syslinux/manifests/init.pp +++ /dev/null @@ -1,119 +0,0 @@ -type Bootentry = Struct[{ - 'label' => String, - 'type' => Enum['linux','com'], - # linux specific - 'extra_args' => Optional[String], - 'initrd' => Optional[String], - # com specific - 'com' => Optional[String], -}] - -class syslinux ( - String $kernel = 'linux', - String $efi_root = '/boot/efi', - String $bootentry = 'syslinux', - - Hash[String,Bootentry,1] $boot_entries, - String $default_boot_entry = $boot_entries.map |$k, $_| { $k }[0], -) { - - $efi_dev = $facts['mountpoints'][$efi_root] - if ! $efi_dev { - fail("A device needs to be mounted on efi_root [${efi_root}]") - } - # $efi_dev['device'] - - ensure_packages ([ - $kernel, - mkinitcpio, - syslinux, - efibootmgr, - ], { - ensure => installed, - }) - - file { "/etc/mkinitcpio.d/${kernel}.preset": - ensure => file, - source => "puppet:///modules/${module_name}/mkinitcpio.${kernel}", - } - - # cp -r /usr/lib/syslinux/efi64 ${efi_root}/EFI/syslinux - - $device = $facts['mountpoints']['/']['device'] - $partuuid = $facts['blkid'][$device]['PARTUUID'] - - $entries = $boot_entries.map |$key, $entry| { - case $entry['type'] { - 'linux': { - $extra_args = $entry['extra_args'] - $initrd = $entry['initrd'] - $hash = { - 'APPEND' => "root=PARTUUID=${partuuid} rw ${extra_args}", - 'INITRD' => "../arch/${initrd}", - 'LINUX' => "../arch/vmlinuz-${kernel}", - } - } - 'com': { - $com = $entry['com'] - $hash = { - 'COM32' => "${com}.c32", - } - } - } - - $common = { 'MENU LABEL' => $entry['label'], } - [$key, $common + $hash] - }.convert_to(Hash) - - file { "${efi_root}/EFI/syslinux/syslinux.cfg": - content => epp("${module_name}/syslinux.cfg.epp", { - 'default' => $default_boot_entry, - 'entries' => $entries, - }) - } - - file { "${efi_root}/EFI/arch": - ensure => directory, - } - - $has_syslinux = $facts['efi']['boots'].any |$_, $value| { - $value == $bootentry - } - - $partition = $facts['partinfo'][basename($efi_dev['device'])] - - if ! $has_syslinux { - $efi_device = $partition['device'] - $partid = $partition['partid'] - exec { "efibootmgr --disk '/dev/${efi_device}' --part ${partid} --create --label '${bootentry}' --loader /EFI/syslinux/syslinux.efi": - path => [ '/usr/bin', '/bin', ], - } - } - - file { '/usr/libexec': - ensure => directory, - } - - file { '/usr/libexec/move-kernel': - ensure => file, - mode => '0555', - content => @("EOF"/$) - #!/bin/sh - IFS='\n' read data - cp "/\$data" "${efi_root}/EFI/arch/vmlinuz-${kernel}" - | EOF - } - - pacman::hook { 'install-kernel': - priority => 60, # something less than /usr/share/libalpm/hooks/90-mkinitcpio-install.hook - trigger => { - type => 'Path', - operation => [ 'Install', 'Upgrade' ], - target => [ 'usr/lib/modules/*/vmlinuz', ], - }, - description => 'Moving kernel to EFI', - when => 'PostTransaction', - exec => '/usr/libexec/move-kernel', - needsTargets => true , - } -} -- cgit v1.2.3