diff options
| author | torben | 2015-03-24 17:06:45 +0100 |
|---|---|---|
| committer | torben | 2015-03-24 17:06:45 +0100 |
| commit | a78d33497c946ba7ec744a6f02edb4ea21cfdee2 (patch) | |
| tree | 4ff75357ade60019aff5f8403587303d7468ee6b | |
| parent | Adding needed dependencies to out example module and configure grub (diff) | |
| download | systemd-init-a78d33497c946ba7ec744a6f02edb4ea21cfdee2.tar.gz systemd-init-a78d33497c946ba7ec744a6f02edb4ea21cfdee2.tar.xz systemd-init-a78d33497c946ba7ec744a6f02edb4ea21cfdee2.zip | |
Configure network.
| -rwxr-xr-x | grub2.conf | 14 | ||||
| -rw-r--r-- | testModule/ifcfg-enp0s3 | 16 | ||||
| -rw-r--r-- | testModule/module-setup.sh | 27 |
3 files changed, 44 insertions, 13 deletions
@@ -1,21 +1,11 @@ #!/bin/sh exec tail -n +3 $0 -# This file provides an easy way to add custom menu entries. Simply type the -# menu entries you want to add after this comment. Be careful not to change -# the 'exec tail' line above. -menuentry 'test' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-6c06919a-389a-4a50-8c6b-b086e65db9b0' { - load_video - set gfxpayload=keep +menuentry 'test' --class centos --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.10.0-123.el7.x86_64-advanced-6c06919a-389a-4a50-8c6b-b086e65db9b0' { insmod gzio insmod part_msdos insmod xfs set root='hd0,msdos1' - if [ x$feature_platform_search_hint = xy ]; then - search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos1 --hint-efi=hd0,msdos1 --hint-baremetal=ahci0,msdos1 --hint='hd0,msdos1' 4236333a-a808-4f6b-b4a6-d963f4a69a25 - else - search --no-floppy --fs-uuid --set=root 4236333a-a808-4f6b-b4a6-d963f4a69a25 - fi - linux16 /vmlinuz-3.10.0-123.el7.x86_64 root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 ro rd.lvm.lv=centos/swap crashkernel=auto rd.lvm.lv=centos/root vconsole.font=latarcyrheb-sun16 vconsole.keymap=de console=tty0 console=ttyS0,9600 rd.shell rd.info rd.debug ip=dhcp rd.break=pre-mount + linux16 /vmlinuz-3.10.0-123.el7.x86_64 ro vconsole.font=latarcyrheb-sun16 vconsole.keymap=de rd.break=cleanup ip=enp0s3:dhcp root=UUID=6c06919a-389a-4a50-8c6b-b086e65db9b0 rd.udev.debug # NOTE: Prevents dracut console: console=tty0 console=ttyS0,9600 initrd16 /initramfs-test.img } diff --git a/testModule/ifcfg-enp0s3 b/testModule/ifcfg-enp0s3 new file mode 100644 index 00000000..2a2d9338 --- /dev/null +++ b/testModule/ifcfg-enp0s3 @@ -0,0 +1,16 @@ +HWADDR=08:00:27:5A:D1:40 +TYPE=Ethernet +BOOTPROTO=dhcp +DEFROUTE=yes +PEERDNS=yes +PEERROUTES=yes +IPV4_FAILURE_FATAL=no +IPV6INIT=yes +IPV6_AUTOCONF=yes +IPV6_DEFROUTE=yes +IPV6_PEERDNS=yes +IPV6_PEERROUTES=yes +IPV6_FAILURE_FATAL=no +NAME=enp0s3 +UUID=5a775495-24d5-4d13-8c06-0196cf621bf1 +ONBOOT=yes diff --git a/testModule/module-setup.sh b/testModule/module-setup.sh index 7a62ecd1..7a4c4e2c 100644 --- a/testModule/module-setup.sh +++ b/testModule/module-setup.sh @@ -1,14 +1,39 @@ #!/bin/bash +# dhclient -d -sf /usr/libexec/nm-dhcp-helper -pf /var/run/dhclient-enp0s3.pid -lf /var/lib/NetworkManager/dhclient-5a775495-24d5-4d13-8c06-0196cf621bf1-enp0s3.lease -cf /var/lib/NetworkManager/dhclient-enp0s3.conf enp0s3 + check() { return 0 } depends() { - echo 'base' + echo base bash kernel-modules systemd shutdown udev-rules debug qemu btrfs return 0 } install() { + inst_multiple ping ip ifconfig mount sshd htop dhclient NetworkManager + inst_simple "$moddir/ifcfg-enp0s3" /etc/sysconfig/network-scripts/ifcfg-enp0s3 + inst /etc/NetworkManager/dispatcher.d/00-netreport + inst /etc/NetworkManager/dispatcher.d/11-dhclient + inst /etc/NetworkManager/dnsmasq.d + inst /etc/NetworkManager/NetworkManager.conf + inst /etc/NetworkManager/system-connections + inst /etc/NetworkManager/VPN return 0 } + +installkernel() { + instmods ip6t_rpfilter ip6t_REJEiCT ipt_REJECT xt_conntrack ebtable_nat \ + ebtable_broute bridge stp llc ebtable_filter ebtables ip6table_nat \ + nf_conntrack_ipv6 nf_defrag_ipv6 nf_nat_ipv6 ip6table_mangle \ + ip6table_security ip6table_raw ip6table_filter ip6_tables \ + iptable_nat nf_conntrack_ipv4 nf_defrag_ipv4 nf_nat_ipv4 nf_nat \ + nf_conntrack iptable_mangle iptable_security iptable_raw \ + iptable_filter ip_tables vboxsf sg ppdev snd_intel8x0 snd_ac97_codec \ + ac97_bus serio_raw snd_seq snd_seq_device i2c_piix4 pcspkr snd_pcm \ + parport_pc parport snd_page_alloc snd_timer snd video soundcore e1000 \ + mperf xfs libcrc32c sd_mod crc_t10dif crct10dif_common sr_mod cdrom \ + ata_generic pata_acpi ahci libahci vboxvideo drm i2c_core ata_piix \ + libata vboxguest dm_mirror dm_region_hash dm_log dm_mod +} |
