From 659fbf0c0467af986aadb6d76693eb3011e62ac4 Mon Sep 17 00:00:00 2001 From: Ian Kelling Date: Sun, 1 Jul 2018 17:01:01 -0400 Subject: [PATCH] minor fixes and improvements --- .../apt/preferences.d/flidas-xenial/FLIDAS | 3 ++ .../etc/apt/sources.list.d/flidas.list/FLIDAS | 3 ++ fai/config/package_config/DEBIAN | 4 +- fai/config/package_config/UBUNTU | 2 +- myfai-chboot | 26 +++++------- myfai-chboot-local | 41 +++++++++++-------- pxe-server | 2 +- wrt-setup-local | 14 +++---- 8 files changed, 51 insertions(+), 44 deletions(-) create mode 100644 fai/config/files/etc/apt/preferences.d/flidas-xenial/FLIDAS diff --git a/fai/config/files/etc/apt/preferences.d/flidas-xenial/FLIDAS b/fai/config/files/etc/apt/preferences.d/flidas-xenial/FLIDAS new file mode 100644 index 0000000..dba92d1 --- /dev/null +++ b/fai/config/files/etc/apt/preferences.d/flidas-xenial/FLIDAS @@ -0,0 +1,3 @@ +Package: * +Pin: release a=xenial +Pin-Priority: -100 diff --git a/fai/config/files/etc/apt/sources.list.d/flidas.list/FLIDAS b/fai/config/files/etc/apt/sources.list.d/flidas.list/FLIDAS index faec0da..9de9a51 100644 --- a/fai/config/files/etc/apt/sources.list.d/flidas.list/FLIDAS +++ b/fai/config/files/etc/apt/sources.list.d/flidas.list/FLIDAS @@ -10,3 +10,6 @@ deb-src http://mirror.fsf.org/trisquel/ flidas-security main # Uncomment this lines to enable the backports optional repository deb http://mirror.fsf.org/trisquel/ flidas-backports main deb-src http://mirror.fsf.org/trisquel/ flidas-backports main + +# needed for debootstrap scripts +deb http://us.archive.ubuntu.com/ubuntu/ xenial main \ No newline at end of file diff --git a/fai/config/package_config/DEBIAN b/fai/config/package_config/DEBIAN index d3e19e4..00d7c8d 100644 --- a/fai/config/package_config/DEBIAN +++ b/fai/config/package_config/DEBIAN @@ -29,10 +29,10 @@ isc-dhcp-client # resolvconf because if we don't install it now we have to reboot for it to # take effect. PACKAGES install GRUB_PC -grub-pc cryptsetup btrfs-tools sudo bridge-utils netcat-openbsd resolvconf lsof +grub-pc cryptsetup btrfs-tools mbuffer sudo bridge-utils netcat-openbsd resolvconf lsof PACKAGES install GRUB_EFI -grub-efi cryptsetup btrfs-tools sudo bridge-utils netcat-openbsd resolvconf lsof +grub-efi cryptsetup btrfs-tools mbuffer sudo bridge-utils netcat-openbsd resolvconf lsof #resolvconf because dpkg-reconfigure on it has this message in flidas: diff --git a/fai/config/package_config/UBUNTU b/fai/config/package_config/UBUNTU index 4cd78c4..5d60b71 100644 --- a/fai/config/package_config/UBUNTU +++ b/fai/config/package_config/UBUNTU @@ -13,7 +13,7 @@ PACKAGES install DHCPC isc-dhcp-client PACKAGES install GRUB_PC -grub-pc cryptsetup btrfs-tools bridge-utils netcat-openbsd lsof +grub-pc cryptsetup btrfs-tools mbuffer bridge-utils netcat-openbsd lsof PACKAGES install XORG ubuntu-desktop diff --git a/myfai-chboot b/myfai-chboot index db19cb6..b5bc847 100755 --- a/myfai-chboot +++ b/myfai-chboot @@ -7,7 +7,7 @@ x=$(readlink -f "$BASH_SOURCE"); cd ${x%/*} usage() { cat <&2' ERR +kgped16=false fai_action=install fai_reboot_arg=,reboot -case $1 in - -h|--help) - echo "see help from myfai-chboot" - exit 0 - ;; - -S) - fai_action=sysinfo - fai_reboot_arg= - shift - ;; - -i) #inventory - fai_action=inventory - fai_reboot_arg= - shift - ;; -esac +while [[ $1 == -* ]]; do + case $1 in + -h|--help) + echo "see help from myfai-chboot" + exit 0 + ;; + -S) + fai_action=sysinfo + fai_reboot_arg= + shift + ;; + -i) #inventory + fai_action=inventory + fai_reboot_arg= + shift + ;; + -k) + kgped16=true; + shift + ;; + esac +done [[ $EUID == 0 ]] || exec sudo "${BASH_SOURCE}" "$@" @@ -37,6 +43,7 @@ host=$1 rm -f /srv/tftp/fai/pxelinux.cfg/* if [[ ! $1 ]]; then + echo "$0: clearing pxe config and exiting" exit 0 fi diff --git a/pxe-server b/pxe-server index d693642..a59e71c 100755 --- a/pxe-server +++ b/pxe-server @@ -66,7 +66,7 @@ redep=true acks=2 wait=false chboot_args=() -temp=$(getopt -l help adrSwh "$@") || usage 1 +temp=$(getopt -l help adrSkwh "$@") || usage 1 eval set -- "$temp" while true; do case $1 in diff --git a/wrt-setup-local b/wrt-setup-local index 4cf186b..2dbc0ce 100755 --- a/wrt-setup-local +++ b/wrt-setup-local @@ -44,8 +44,8 @@ v() { ### network config ### -ssid=cmc2 -lan=10.1.0.0 +ssid="check out gnu.org" +lan=10.0.0.0 mask=255.255.0.0 l=${lan%.0} @@ -155,20 +155,20 @@ v /etc/init.d/nfsd enable wireless_restart=true key=pictionary49 for x in 0 1; do - if [[ $(uci get wireless.default_radio$x.ssid) != $ssid ]]; then - uci set wireless.default_radio$x.ssid=$ssid + if [[ $(uci get wireless.default_radio$x.ssid) != "$ssid" ]]; then + v uci set wireless.default_radio$x.ssid="$ssid" wireless_restart=true fi if [[ $(uci get wireless.default_radio$x.key) != $key ]]; then - uci set wireless.default_radio$x.key=$key + v uci set wireless.default_radio$x.key=$key wireless_restart=true fi if [[ $(uci get wireless.default_radio$x.encryption) != $key ]]; then - uci set wireless.default_radio$x.encryption=$key + v uci set wireless.default_radio$x.encryption=$key wireless_restart=true fi if [[ $(uci get wireless.default_radio$x.disabled 2>/dev/null) ]]; then - uci delete wireless.default_radio$x.disabled + v uci delete wireless.default_radio$x.disabled wireless_restart=true fi done -- 2.30.2