From owner-freebsd-ports-bugs@FreeBSD.ORG Sun Feb 12 02:10:09 2006 Return-Path: X-Original-To: freebsd-ports-bugs@hub.freebsd.org Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 200D616A420 for ; Sun, 12 Feb 2006 02:10:09 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9E02643D46 for ; Sun, 12 Feb 2006 02:10:08 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id k1C2A8Hq027788 for ; Sun, 12 Feb 2006 02:10:08 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id k1C2A8ZR027781; Sun, 12 Feb 2006 02:10:08 GMT (envelope-from gnats) Resent-Date: Sun, 12 Feb 2006 02:10:08 GMT Resent-Message-Id: <200602120210.k1C2A8ZR027781@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, martinko Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB7BF16A422 for ; Sun, 12 Feb 2006 02:08:03 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id A27CB43D46 for ; Sun, 12 Feb 2006 02:08:03 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.13.1/8.13.1) with ESMTP id k1C283QC010182 for ; Sun, 12 Feb 2006 02:08:03 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.13.1/8.13.1/Submit) id k1C2836L010181; Sun, 12 Feb 2006 02:08:03 GMT (envelope-from nobody) Message-Id: <200602120208.k1C2836L010181@www.freebsd.org> Date: Sun, 12 Feb 2006 02:08:03 GMT From: martinko To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Cc: Subject: ports/93218: New port: sysutils/bsd-splash-changer Boot Splash Image Changer X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Feb 2006 02:10:09 -0000 >Number: 93218 >Category: ports >Synopsis: New port: sysutils/bsd-splash-changer Boot Splash Image Changer >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Feb 12 02:10:07 GMT 2006 >Closed-Date: >Last-Modified: >Originator: martinko >Release: FreeBSD 6.0-STABLE >Organization: >Environment: FreeBSD mb-aw1n-bsd 6.0-STABLE FreeBSD 6.0-STABLE #1: Wed Feb 1 08:55:03 CET 2006 root@mb-aw1n-bsd:/usr/obj/usr/src/sys/MB-AW1N i386 >Description: This is a new port of boot splash image changer for FreeBSD. >How-To-Repeat: N/A >Fix: # This is a shell archive. Save it in a file, remove anything before # this line, and then unpack it by entering "sh file". Note, it may # create directories; files and directories will be owned by you and # have default permissions. # # This archive contains: # # bsd-splash-changer # bsd-splash-changer/files # bsd-splash-changer/files/change_splash.sh.in # bsd-splash-changer/pkg-plist # bsd-splash-changer/pkg-descr # bsd-splash-changer/Makefile # echo c - bsd-splash-changer mkdir -p bsd-splash-changer > /dev/null 2>&1 echo c - bsd-splash-changer/files mkdir -p bsd-splash-changer/files > /dev/null 2>&1 echo x - bsd-splash-changer/files/change_splash.sh.in sed 's/^X//' >bsd-splash-changer/files/change_splash.sh.in << 'END-of-bsd-splash-changer/files/change_splash.sh.in' X#!/bin/sh X# X# /usr/local/etc/rc.d/change_splash.sh * mato [11-feb-2006] X# X# PROVIDE: change_splash X# REQUIRE: mountcritremote X# KEYWORD: FreeBSD X# X# Boot Splash Image Changer * martinko [09-feb-2006] X# X# Add the following to /etc/rc.conf[.local] to enable this service: X# X# splash_changer_enable="YES" X# splash_changer_dir (string): Defaults to "/boot/splashes". X# Splash image file is randomly picked up from this directory. X# splash_changer_file (string): Defaults to "/boot/splash". X# This symbolic link points to recently chosen splash image file. X# X X. %%RC_SUBR%% X Xname=change_splash Xrcvar=`set_rcvar splash_changer` X Xstart_cmd=${name}_start X X: ${splash_changer_enable="NO"} X: ${splash_changer_file="/boot/splash"} X: ${splash_changer_dir="/boot/splashes"} X Xchange_splash_start() X{ X echo "Changing splash image." X X local splash_file splash_dir X local fcount random choice select filename X X splash_file="${splash_changer_file-"/boot/splashes/current"}" X splash_dir="${splash_changer_dir-"/boot/splashes"}" X X [ -L "$splash_file" -o ! -e "$splash_file" ] || err 1 "$splash_file is not a symbolic link" X [ -d "$splash_dir" ] || err 2 "$splash_dir is not a directory" X X if [ "$splash_dir" = "${splash_file%/*}" ] X then X fcount="`ls -1 "$splash_dir" | grep -v "^${splash_file##*/}$" | wc -l`" X else X fcount="`ls -1 "$splash_dir" | wc -l`" X fi X random="`od -A n -D -N 1 < /dev/random`" X choice="`expr $random % $fcount`" X select=0 X X [ -z "$choice" ] && err 3 "choice failed" X X for filename in "$splash_dir"/* X do X [ "$filename" = "$splash_file" ] && continue X if [ $select -eq $choice ] X then X ln -fs "$filename" "$splash_file" X break X fi X select="`expr $select + 1`" X done X X debug "Boot splash image changed to $filename" X} X Xload_rc_config $name Xrun_rc_command "$1" X X# done END-of-bsd-splash-changer/files/change_splash.sh.in echo x - bsd-splash-changer/pkg-plist sed 's/^X//' >bsd-splash-changer/pkg-plist << 'END-of-bsd-splash-changer/pkg-plist' X@exec mkdir -p /boot/splashes X@unexec rmdir /boot/splashes 2> /dev/null || true END-of-bsd-splash-changer/pkg-plist echo x - bsd-splash-changer/pkg-descr sed 's/^X//' >bsd-splash-changer/pkg-descr << 'END-of-bsd-splash-changer/pkg-descr' XThis is a boot splash image changer for FreeBSD. X XAfter installation place your image files to /boot/splashes directory Xand add the following to /etc/rc.conf[.local] to enable this service: Xsplash_changer_enable="YES" XAlso, you need to enable boot splash screen as described in splash(4) Xand set the following in /boot/loader.conf[.local]: Xbitmap_name="/boot/splash" X XWWW: http://mato.gamato.org/freebsd/ END-of-bsd-splash-changer/pkg-descr echo x - bsd-splash-changer/Makefile sed 's/^X//' >bsd-splash-changer/Makefile << 'END-of-bsd-splash-changer/Makefile' X# New ports collection makefile for: bsd-splash-changer X# Date created: 11 Feb 2006 X# Whom: Martin Otto X# X# $FreeBSD$ X# X# This port is self contained in the src directory. X# X XPORTNAME= bsd-splash-changer XPORTVERSION= 060211 XCATEGORIES= sysutils XMASTER_SITES= # none XDISTFILES= # none X XMAINTAINER= gamato@pobox.sk XCOMMENT= Boot Splash Image Changer X XUSE_RC_SUBR= change_splash.sh X XNO_BUILD= yes X Xdo-fetch: X @${DO_NADA} X Xdo-install: X ${MKDIR} /boot/splashes X X.include END-of-bsd-splash-changer/Makefile exit >Release-Note: >Audit-Trail: >Unformatted: