From 67ac28a2b9a0a2efdcc3b5072c92fdc3d4c2c6a7 Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Sat, 7 May 2011 09:26:57 -0500 Subject: [PATCH] targets/i386/NEPETA: add gentree configuration --- targets/i386/NEPETA/config/conf/.keep | 0 targets/i386/NEPETA/config/conf/etc.md_size | 1 + targets/i386/NEPETA/config/conf/home.md_size | 1 + targets/i386/NEPETA/config/conf/root.md_size | 1 + targets/i386/NEPETA/config/conf/var.md_size | 1 + targets/i386/NEPETA/config/overlay/.keep | 0 .../NEPETA/config/overlay/boot/loader.conf | 13 ++++ targets/i386/NEPETA/config/overlay/etc/bashrc | 17 +++++ targets/i386/NEPETA/config/overlay/etc/fstab | 3 + .../i386/NEPETA/config/overlay/etc/inputrc | 17 +++++ .../i386/NEPETA/config/overlay/etc/rc.conf | 17 +++++ .../config/overlay/etc/rc.d/saveconfig-early | 16 ++++ .../config/overlay/etc/rc.d/saveconfig-late | 16 ++++ targets/i386/NEPETA/config/overlay/home/.keep | 0 .../NEPETA/config/overlay/sbin/saveconfig | 74 +++++++++++++++++++ .../overlay/usr/local/etc/ssmtp/revaliases | 6 ++ .../overlay/usr/local/etc/ssmtp/ssmtp.conf | 2 + .../overlay/usr/share/skel/dot.bash_profile | 1 + .../config/overlay/usr/share/skel/dot.bashrc | 1 + targets/i386/NEPETA/config/overlay/zfs/.keep | 0 targets/i386/NEPETA/config/patch/.keep | 0 .../etc_mail_mailer.conf-use-ssmtp.patch | 18 +++++ .../patch/etc_profile-sensible-defaults.patch | 62 ++++++++++++++++ .../patch/etc_rc.d_zfs-tmpfs-mountpoint.patch | 30 ++++++++ .../etc_rc.initdiskless-fix-clockskew.patch | 33 +++++++++ .../etc_rc.initdiskless-mount-anything.patch | 26 +++++++ .../patch/etc_rc.initdiskless-no-rescue.patch | 11 +++ ..._etc_gkrellmd.conf-sensible-defaults.patch | 20 +++++ .../usr_local_etc_sudoers-allow-wheel.patch | 11 +++ 29 files changed, 398 insertions(+) create mode 100644 targets/i386/NEPETA/config/conf/.keep create mode 100644 targets/i386/NEPETA/config/conf/etc.md_size create mode 100644 targets/i386/NEPETA/config/conf/home.md_size create mode 100644 targets/i386/NEPETA/config/conf/root.md_size create mode 100644 targets/i386/NEPETA/config/conf/var.md_size create mode 100644 targets/i386/NEPETA/config/overlay/.keep create mode 100644 targets/i386/NEPETA/config/overlay/boot/loader.conf create mode 100644 targets/i386/NEPETA/config/overlay/etc/bashrc create mode 100644 targets/i386/NEPETA/config/overlay/etc/fstab create mode 100644 targets/i386/NEPETA/config/overlay/etc/inputrc create mode 100644 targets/i386/NEPETA/config/overlay/etc/rc.conf create mode 100755 targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-early create mode 100755 targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-late create mode 100644 targets/i386/NEPETA/config/overlay/home/.keep create mode 100755 targets/i386/NEPETA/config/overlay/sbin/saveconfig create mode 100644 targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/revaliases create mode 100644 targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/ssmtp.conf create mode 120000 targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bash_profile create mode 120000 targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bashrc create mode 100644 targets/i386/NEPETA/config/overlay/zfs/.keep create mode 100644 targets/i386/NEPETA/config/patch/.keep create mode 100644 targets/i386/NEPETA/config/patch/etc_mail_mailer.conf-use-ssmtp.patch create mode 100644 targets/i386/NEPETA/config/patch/etc_profile-sensible-defaults.patch create mode 100644 targets/i386/NEPETA/config/patch/etc_rc.d_zfs-tmpfs-mountpoint.patch create mode 100644 targets/i386/NEPETA/config/patch/etc_rc.initdiskless-fix-clockskew.patch create mode 100644 targets/i386/NEPETA/config/patch/etc_rc.initdiskless-mount-anything.patch create mode 100644 targets/i386/NEPETA/config/patch/etc_rc.initdiskless-no-rescue.patch create mode 100644 targets/i386/NEPETA/config/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch create mode 100644 targets/i386/NEPETA/config/patch/usr_local_etc_sudoers-allow-wheel.patch diff --git a/targets/i386/NEPETA/config/conf/.keep b/targets/i386/NEPETA/config/conf/.keep new file mode 100644 index 0000000..e69de29 diff --git a/targets/i386/NEPETA/config/conf/etc.md_size b/targets/i386/NEPETA/config/conf/etc.md_size new file mode 100644 index 0000000..7b16a10 --- /dev/null +++ b/targets/i386/NEPETA/config/conf/etc.md_size @@ -0,0 +1 @@ +10240 diff --git a/targets/i386/NEPETA/config/conf/home.md_size b/targets/i386/NEPETA/config/conf/home.md_size new file mode 100644 index 0000000..b71078f --- /dev/null +++ b/targets/i386/NEPETA/config/conf/home.md_size @@ -0,0 +1 @@ +131072 diff --git a/targets/i386/NEPETA/config/conf/root.md_size b/targets/i386/NEPETA/config/conf/root.md_size new file mode 100644 index 0000000..b71078f --- /dev/null +++ b/targets/i386/NEPETA/config/conf/root.md_size @@ -0,0 +1 @@ +131072 diff --git a/targets/i386/NEPETA/config/conf/var.md_size b/targets/i386/NEPETA/config/conf/var.md_size new file mode 100644 index 0000000..b71078f --- /dev/null +++ b/targets/i386/NEPETA/config/conf/var.md_size @@ -0,0 +1 @@ +131072 diff --git a/targets/i386/NEPETA/config/overlay/.keep b/targets/i386/NEPETA/config/overlay/.keep new file mode 100644 index 0000000..e69de29 diff --git a/targets/i386/NEPETA/config/overlay/boot/loader.conf b/targets/i386/NEPETA/config/overlay/boot/loader.conf new file mode 100644 index 0000000..2720359 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/boot/loader.conf @@ -0,0 +1,13 @@ +loader_logo="beastie" +autoboot_delay="5" + +module_path="/boot/modules;/modules" + +# Be sure to include all dependencies! +geom_uzip_load="YES" +ichsmb_load="YES" +ichwd_load="YES" +smbus_load="YES" +zlib_load="YES" + +vfs.root.mountfrom="cd9660:/dev/iso9660/root" diff --git a/targets/i386/NEPETA/config/overlay/etc/bashrc b/targets/i386/NEPETA/config/overlay/etc/bashrc new file mode 100644 index 0000000..5c42208 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/bashrc @@ -0,0 +1,17 @@ +# Enable emacs line editing mode +set -o emacs + +# Some useful aliases +alias h='fc -l' +alias j=jobs +alias m=$PAGER +alias ll='ls -laFo' +alias l='ls -l' +alias g='egrep -i' +alias ls='ls -G' +alias pp='ps axopid,user,state,command' + +# Be paranoid +alias cp='cp -ip' +alias mv='mv -i' +alias rm='rm -i' diff --git a/targets/i386/NEPETA/config/overlay/etc/fstab b/targets/i386/NEPETA/config/overlay/etc/fstab new file mode 100644 index 0000000..38e9ef1 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/fstab @@ -0,0 +1,3 @@ +/dev/iso9660/root / cd9660 ro 0 0 +/dev/ufs/boot /boot ufs ro,noatime,sync 0 2 +/dev/ufs/conf /conf ufs ro,noatime,sync 0 2 diff --git a/targets/i386/NEPETA/config/overlay/etc/inputrc b/targets/i386/NEPETA/config/overlay/etc/inputrc new file mode 100644 index 0000000..6f7925e --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/inputrc @@ -0,0 +1,17 @@ +set meta-flag on +set input-meta on +set convert-meta off +set output-meta on + +"\e[1~": beginning-of-line +"\e[4~": end-of-line +"\e[5~": beginning-of-history +"\e[6~": end-of-history +"\e[3~": delete-char +"\e[2~": quoted-insert +"\e[5C": forward-word +"\e[5D": backward-word + +# fix Home and End for German users +"\e[7~": beginning-of-line +"\e[8~": end-of-line diff --git a/targets/i386/NEPETA/config/overlay/etc/rc.conf b/targets/i386/NEPETA/config/overlay/etc/rc.conf new file mode 100644 index 0000000..3d15b83 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/rc.conf @@ -0,0 +1,17 @@ +# System config +hostname="nepeta.cyberleo.net" +local_startup="/etc/local/rc.d" +ifconfig_em0="DHCP" + +# Daemon configuration +ntpd_enable="YES" +ntpd_sync_on_start="YES" +sshd_enable="YES" +gkrellmd_enable="YES" +watchdogd_enable="YES" + +# Disable sendmail +sendmail_enable="NONE" +sendmail_submit_enable="NO" +sendmail_outbound_enable="NO" +sendmail_msp_queue_enable="NO" diff --git a/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-early b/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-early new file mode 100755 index 0000000..574a89c --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-early @@ -0,0 +1,16 @@ +#!/bin/sh + +# PROVIDE: saveconfig +# REQUIRE: LOGIN +# BEFORE: +# KEYWORD: shutdown + +name="saveconfig" +stop_cmd="saveconfig_stop" + +saveconfig_stop(){ + /sbin/saveconfig +} + +load_rc_config $name +run_rc_command "$1" diff --git a/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-late b/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-late new file mode 100755 index 0000000..5dc459a --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/etc/rc.d/saveconfig-late @@ -0,0 +1,16 @@ +#!/bin/sh + +# PROVIDE: saveconfig +# REQUIRE: +# BEFORE: FILESYSTEMS +# KEYWORD: shutdown + +name="saveconfig" +stop_cmd="saveconfig_stop" + +saveconfig_stop(){ + /sbin/saveconfig +} + +load_rc_config $name +run_rc_command "$1" diff --git a/targets/i386/NEPETA/config/overlay/home/.keep b/targets/i386/NEPETA/config/overlay/home/.keep new file mode 100644 index 0000000..e69de29 diff --git a/targets/i386/NEPETA/config/overlay/sbin/saveconfig b/targets/i386/NEPETA/config/overlay/sbin/saveconfig new file mode 100755 index 0000000..8d597de --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/sbin/saveconfig @@ -0,0 +1,74 @@ +#!/bin/sh + +[ "$(id -u)" -ne 0 ] && exec /usr/local/bin/sudo "${0}" "${@}" + +echo -n "Saving configuration... " + +if [ ! -f /etc/diskless ] +then + echo "No flash setup detected." + exit 1 +fi + +# Find all files newer than /COPYRIGHT and print them out +find_newer_files() { + [ -d "${1}" ] || return 1 + find "${1}" -not -regex '.*/tmp/*.' -newer /COPYRIGHT -print +} + +# Archive all newer files into a gzipped cpio archive +archive_cpio() { + [ -f "${2}" ] && return 1 + ( cd /; find_newer_files "${1}" | cpio -o --quiet | gzip -9 > "${2}" ) || return 1 +} + +# Archive specified files to named target +archive() { + archive_cpio "${1}" "${2:-/conf/tmp/${1}}.cpio.gz" || return 1 +} + +# Mount /conf read-write, and upgrade to read-write if mounted read-only. +if grep -q /conf /etc/fstab +then + _conf_mount=yes + mount | grep -q /conf && _conf_mounted=yes + mount | grep /conf | grep -q read-only && _conf_readonly=yes + + # Mount if unmounted + [ ! "${_conf_mounted}" ] && mount -w /conf + + # Upgrade to read/write + [ "${_conf_mounted}" -a "${_conf_readonly}" ] && mount -u -w /conf +fi + +# Store config in temp staging area +rm -Rf /conf/tmp || exit 1 +mkdir -p /conf/tmp || exit 1 +chmod 750 /conf/tmp || exit 1 + +# Grab a list of confpacks to store +for pack in /conf/base/*/md_size +do + pack="$(basename "$(dirname "${pack}")")" + archive "${pack}" || exit 1 +done + +# Rotate current config to dated backup +# Unlimited history method: (make sure you have provisions for removing the old backups, or this can get HUGE! +dest="$(date -r "$(stat -f '%c' "/conf/default")" "+%Y-%m-%dT%H-%M-%S")" +mv /conf/default "/conf/backup/${dest}" || exit 1 + +# Move temp config to current +mv /conf/tmp /conf/default || mv "/conf/backup/${dest}" "/conf/default" + +# Umount /conf afterwards, if it wasn't mounted +if [ "${_conf_mount}" ] +then + # Unmount if it wasn't mounted + [ ! "${_conf_mounted}" ] && umount /conf + + # Downgrade to read-only if it was read-only + [ "${_conf_mounted}" -a "${_conf_readonly}" ] && mount -u -r -f /conf +fi + +echo "Done!" diff --git a/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/revaliases b/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/revaliases new file mode 100644 index 0000000..1caccf0 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/revaliases @@ -0,0 +1,6 @@ +# sSMTP aliases +# +# Format: local_account:outgoing_address:mailhub +# +# Example: root:your_login@your.domain:mailhub.your.domain[:port] +# where [:port] is an optional port number that defaults to 25. diff --git a/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/ssmtp.conf b/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/ssmtp.conf new file mode 100644 index 0000000..811df3e --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/usr/local/etc/ssmtp/ssmtp.conf @@ -0,0 +1,2 @@ +root=postmaster +mailhub=gateway.cyberleo.net diff --git a/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bash_profile b/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bash_profile new file mode 120000 index 0000000..c4a522b --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bash_profile @@ -0,0 +1 @@ +../../local/etc/bash-config/bash_profile \ No newline at end of file diff --git a/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bashrc b/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bashrc new file mode 120000 index 0000000..fce8dd0 --- /dev/null +++ b/targets/i386/NEPETA/config/overlay/usr/share/skel/dot.bashrc @@ -0,0 +1 @@ +../../local/etc/bash-config/bashrc \ No newline at end of file diff --git a/targets/i386/NEPETA/config/overlay/zfs/.keep b/targets/i386/NEPETA/config/overlay/zfs/.keep new file mode 100644 index 0000000..e69de29 diff --git a/targets/i386/NEPETA/config/patch/.keep b/targets/i386/NEPETA/config/patch/.keep new file mode 100644 index 0000000..e69de29 diff --git a/targets/i386/NEPETA/config/patch/etc_mail_mailer.conf-use-ssmtp.patch b/targets/i386/NEPETA/config/patch/etc_mail_mailer.conf-use-ssmtp.patch new file mode 100644 index 0000000..db0e3c2 --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_mail_mailer.conf-use-ssmtp.patch @@ -0,0 +1,18 @@ +--- etc/mail/mailer.conf.orig 2010-03-21 09:35:11.000000000 +0000 ++++ etc/mail/mailer.conf 2010-03-21 09:39:00.000000000 +0000 +@@ -2,9 +2,9 @@ + # + # Execute the "real" sendmail program, named /usr/libexec/sendmail/sendmail + # +-sendmail /usr/libexec/sendmail/sendmail +-send-mail /usr/libexec/sendmail/sendmail +-mailq /usr/libexec/sendmail/sendmail +-newaliases /usr/libexec/sendmail/sendmail +-hoststat /usr/libexec/sendmail/sendmail +-purgestat /usr/libexec/sendmail/sendmail ++sendmail /usr/local/sbin/ssmtp ++send-mail /usr/local/sbin/ssmtp ++mailq /usr/local/sbin/ssmtp ++newaliases /usr/local/sbin/ssmtp ++hoststat true ++purgestat true diff --git a/targets/i386/NEPETA/config/patch/etc_profile-sensible-defaults.patch b/targets/i386/NEPETA/config/patch/etc_profile-sensible-defaults.patch new file mode 100644 index 0000000..c88218a --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_profile-sensible-defaults.patch @@ -0,0 +1,62 @@ +--- etc/profile 2010-01-24 09:37:51.000000000 +0000 ++++ etc/profile 2010-01-24 09:54:47.000000000 +0000 +@@ -16,3 +16,59 @@ + # msgs -f + # Allow terminal messages + # mesg y ++ ++# Title for titleable terminals ++case "${TERM}" in ++xterm*|rxvt*|Eterm|aterm|kterm|gnome*|interix) ++ title="\[\033]0;\h(\u)\007\]" ++ ;; ++screen) ++ title="\[\033_\h(\u)\033\\\]" ++ ;; ++*) ++ title="" ++ ;; ++esac ++ ++# Set the flag variable, if we can ++[ -x "$(which flag)" -a ! -f "${HOME}/.noflag" ] && export FLAG="($($(which flag) -e))" ++export PS1="${title}${FLAG}${PS1}" ++ ++# Set up input handling and environment ++[ -f /etc/inputrc ] && export INPUTRC=/etc/inputrc ++[ -f "${HOME}/.inputrc" ] && export INPUTRC="${HOME}/.inputrc" ++ ++[ -f "${HOME}/.shrc" ] && . "${HOME}/.shrc" ++ ++export BLOCKSIZE=K ++export EDITOR=vi ++export PAGER=less ++ ++# Path ++if [ "$(id -u)" -eq 0 ] || (id -nG | egrep -q "(^wheel *|* wheel *|* wheel$)") ++then ++ export PATH=${HOME}/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin ++else ++ export PATH=${HOME}/bin:/bin:/usr/bin:/usr/games:/usr/local/bin ++fi ++ ++# Local environment ++if [ -n "${BASH}" ] ++then ++ if [ -f "${HOME}/.bashrc" ] ++ then ++ export ENV="${HOME}/.bashrc" ++ . "${HOME}/.bashrc" ++ elif [ -f "/etc/bashrc" ] ++ then ++ export ENV="/etc/bashrc" ++ . "/etc/bashrc" ++ fi ++else ++ if [ -f "${HOME}/.shrc" ] ++ then ++ export ENV="${HOME}/.shrc" ++ . "${HOME}/.shrc" ++ fi ++fi ++ diff --git a/targets/i386/NEPETA/config/patch/etc_rc.d_zfs-tmpfs-mountpoint.patch b/targets/i386/NEPETA/config/patch/etc_rc.d_zfs-tmpfs-mountpoint.patch new file mode 100644 index 0000000..ff01ae6 --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_rc.d_zfs-tmpfs-mountpoint.patch @@ -0,0 +1,30 @@ +--- etc/rc.d/zfs 2010-01-25 06:27:11.000000000 +0000 ++++ etc/rc.d/zfs 2009-04-12 16:59:35.000000000 +0000 +@@ -23,6 +23,14 @@ + + zfs_start_main() + { ++ # If root is read-only, mount a tmpfs on /zfs to provide ++ # a writable mountpoint, if not already ++ if [ -d /zfs ] && mount | grep ' on / ' | grep -q 'read-only' && \ ++ ! mount | grep -q ' on /zfs (tmpfs' ++ then ++ mount -t tmpfs -o size=65536 tmpfs /zfs ++ fi ++ + zfs mount -a + zfs share -a + if [ ! -r /etc/zfs/exports ]; then +@@ -50,6 +58,12 @@ + { + zfs unshare -a + zfs unmount -a ++ ++ # If /zfs is a tmpfs, unmount it ++ if mount | grep -q ' on /zfs (tmpfs' ++ then ++ umount -f /zfs ++ fi + } + + zfs_stop() diff --git a/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-fix-clockskew.patch b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-fix-clockskew.patch new file mode 100644 index 0000000..01d720c --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-fix-clockskew.patch @@ -0,0 +1,33 @@ +--- etc/rc.initdiskless 2011-01-23 05:59:54.000000000 -0600 ++++ etc/rc.initdiskless 2011-05-06 12:40:10.940259210 -0500 +@@ -337,9 +337,30 @@ + + # NFS remount + handle_remount $j ++ ++ # Keep track of the most recent timestamp for clockskew detection ++ stamp="$(/usr/bin/stat -f %Um "$j")" ++ [ "${stamp}" -gt "${newest:-0}" ] && newest="${stamp}" ++ # + done + done + ++# ++# Check for clock skew, to make sure the local timestamp is newer than ++# the last saveconfig or the date of the image ++stamp="$(/usr/bin/stat -f %Um "/COPYRIGHT")" ++[ "${stamp}" -gt "${newest:-0}" ] && newest="${stamp}" ++if [ "${newest}" -gt "$(/bin/date +%s)" ] ++then ++ # Clock skew detected! Attempt to correct ++ correction="$(( ${newest} + 60 ))" ++ printf "Clock skew detected!\n" >&2 ++ printf " Now (%s) is before newest (%s)\n" "$(/bin/date)" "$(/bin/date -jf %s "${newest}")" >&2 ++ printf "Clock reset to %s\n" "$(/bin/date -f %s "${correction}")" >&2 ++ printf "Run ntpd or ntpdate or manually set correct time!\n" >&2 ++fi ++# ++ + # - Create all required MFS filesystems and populate them from + # our templates. Support both a direct template and a dir.cpio.gz + # archive. Support dir.remove files containing a list of relative diff --git a/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-mount-anything.patch b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-mount-anything.patch new file mode 100644 index 0000000..094f47a --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-mount-anything.patch @@ -0,0 +1,26 @@ +--- etc/rc.initdiskless 2009-11-30 02:55:12.000000000 +0000 ++++ etc/rc.initdiskless 2010-01-03 16:02:27.000000000 +0000 +@@ -190,8 +190,21 @@ # handle_remount() { # $1 = mount point + log "nfspt ${nfspt} mountopts ${mountopts}" + # prepend the nfs root if not present + [ `expr "$nfspt" : '\(.\)'` = "/" ] && nfspt="${nfsroot}${nfspt}" +- mount_nfs $mountopts $nfspt $b +- chkerr $? "mount_nfs $nfspt $b" ++ ++ # Hack to allow mounting of any filesystem type, not just NFS ++ # (thumbdrive w/glabel *hint hint*) ++ # ufs:/dev/label/conf (or nfs:server:/root -- server:/root works too, if ++ # server isn't named ufs, msdosfs, etc...) ++ eval $(echo ${nfspt} | sed -E 's/^([^:]+):(.*)$/fstype="\1" device="\2"/') ++ case "${fstype}" in ++ ufs|msdosfs|cd9660|nfs) ;; ++ # Backwards compatibility. Hopefully someone didn't name their NFS server 'ufs'... ++ *) device="${fstype}:${device}"; fstype="nfs" ;; ++ esac ++ mount -t "${fstype}" "${device}" "${b}" ++ chkerr $? "mount -t ${fstype} ${device} ${b}" ++ # ++ + to_umount="$b ${to_umount}" + } + diff --git a/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-no-rescue.patch b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-no-rescue.patch new file mode 100644 index 0000000..fdf2c27 --- /dev/null +++ b/targets/i386/NEPETA/config/patch/etc_rc.initdiskless-no-rescue.patch @@ -0,0 +1,11 @@ +--- etc/rc.initdiskless 2010-01-03 03:44:29.000000000 +0000 ++++ etc/rc.initdiskless 2010-01-03 03:44:43.000000000 +0000 +@@ -376,7 +376,7 @@ + if [ -f $j ]; then + create_md $subdir + echo "Loading /$subdir from cpio archive $j" +- (cd / ; /rescue/tar -xpf $j) ++ (cd / ; /usr/bin/tar -xpf $j) + fi + done + for j in /conf/$i/*.remove ; do diff --git a/targets/i386/NEPETA/config/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch b/targets/i386/NEPETA/config/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch new file mode 100644 index 0000000..175ec3b --- /dev/null +++ b/targets/i386/NEPETA/config/patch/usr_local_etc_gkrellmd.conf-sensible-defaults.patch @@ -0,0 +1,20 @@ +--- usr/local/etc/gkrellmd.conf 2010-12-08 08:07:03.962131213 +0000 ++++ usr/local/etc/gkrellmd.conf 2010-12-08 12:21:32.153210246 +0000 +@@ -76,7 +76,7 @@ + # Minimum is 2 (less than 2 for no I/O disconnecting and is the default). + # Requires at least 2.1.8 versions of both gkrellmd and gkrellm. + # +-#io-timeout 5 ++io-timeout 5 + + # Configure gkrellm clients to attempt automatic reconnects to a + # gkrellmd server every reconnect-timeout seconds after a disconnected +@@ -85,7 +85,7 @@ + # Minimum is 2 (less than 2 for no automatic reconnecting and is the default). + # Requires at least 2.1.8 versions of both gkrellmd and gkrellm. + # +-#reconnect-timeout 5 ++reconnect-timeout 5 + + # Server side local mailbox counts can be sent to gkrellm clients. List here + # paths to mbox, MH mail, or Maildir style mailboxes. diff --git a/targets/i386/NEPETA/config/patch/usr_local_etc_sudoers-allow-wheel.patch b/targets/i386/NEPETA/config/patch/usr_local_etc_sudoers-allow-wheel.patch new file mode 100644 index 0000000..6c9dc3d --- /dev/null +++ b/targets/i386/NEPETA/config/patch/usr_local_etc_sudoers-allow-wheel.patch @@ -0,0 +1,11 @@ +--- usr/local/etc/sudoers 2010-12-08 12:37:47.696505554 +0000 ++++ usr/local/etc/sudoers 2010-12-08 12:38:33.339922804 +0000 +@@ -80,7 +80,7 @@ + root ALL=(ALL) ALL + + ## Uncomment to allow members of group wheel to execute any command +-# %wheel ALL=(ALL) ALL ++%wheel ALL=(ALL) ALL + + ## Same thing without a password + # %wheel ALL=(ALL) NOPASSWD: ALL -- 2.42.0