mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
Bashpromt erweitert und FTP Upload wieder funktionierend gemacht...
git-svn-id: http://svn.ipfire.org/svn/ipfire/trunk@397 ea5c0bd1-69bd-2848-81d8-4f18e57aeed8
This commit is contained in:
32
config/etc/bashrc
Normal file
32
config/etc/bashrc
Normal file
@@ -0,0 +1,32 @@
|
|||||||
|
# Begin /etc/bashrc
|
||||||
|
# Written for Beyond Linux From Scratch
|
||||||
|
# by James Robertson <jameswrobertson@earthlink.net>
|
||||||
|
# updated by Bruce Dubbs <bdubbs@linuxfromscratch.org>
|
||||||
|
|
||||||
|
# Make sure that the terminal is set up properly for each shell
|
||||||
|
|
||||||
|
if [ -f /etc/profile.d/tinker-term.sh ]; then
|
||||||
|
source /etc/profile.d/tinker-term.sh
|
||||||
|
fi
|
||||||
|
|
||||||
|
# System wide aliases and functions.
|
||||||
|
|
||||||
|
# System wide environment variables and startup programs should go into
|
||||||
|
# /etc/profile. Personal environment variables and startup programs
|
||||||
|
# should go into ~/.bash_profile. Personal aliases and functions should
|
||||||
|
# go into ~/.bashrc
|
||||||
|
|
||||||
|
# Provides a colored /bin/ls command. Used in conjunction with code in
|
||||||
|
# /etc/profile.
|
||||||
|
|
||||||
|
alias ls='ls --color=auto'
|
||||||
|
|
||||||
|
# Provides prompt for non-login shells, specifically shells started
|
||||||
|
# in the X environment. [Review the LFS archive thread titled
|
||||||
|
# PS1 Environment Variable for a great case study behind this script
|
||||||
|
# addendum.]
|
||||||
|
|
||||||
|
#export PS1="[\u@\h \w]\\$ "
|
||||||
|
export PS1='\u@\h:\w\$ '
|
||||||
|
|
||||||
|
# End /etc/bashrc
|
||||||
@@ -1,49 +1,64 @@
|
|||||||
# /etc/bashrc
|
# Begin /etc/profile
|
||||||
|
# Written for Beyond Linux From Scratch
|
||||||
|
# by James Robertson <jameswrobertson@earthlink.net>
|
||||||
|
# modifications by Dagmar d'Surreal <rivyqntzne@pbzpnfg.arg>
|
||||||
|
|
||||||
umask 022
|
# System wide environment variables and startup programs.
|
||||||
unset i
|
|
||||||
|
|
||||||
# are we an interactive shell?
|
# System wide aliases and functions should go in /etc/bashrc. Personal
|
||||||
if [ "$PS1" ]; then
|
# environment variables and startup programs should go into
|
||||||
if [ -x /usr/bin/tput ]; then
|
# ~/.bash_profile. Personal aliases and functions should go into
|
||||||
if [ "x`tput kbs`" != "x" ]; then # We can't do this with "dumb" terminal
|
# ~/.bashrc.
|
||||||
stty erase `tput kbs`
|
|
||||||
elif [ -x /usr/bin/wc ]; then
|
# Functions to help us manage paths. Second argument is the name of the
|
||||||
if [ "`tput kbs|wc -c `" -gt 0 ]; then # We can't do this with "dumb" terminal
|
# path variable to be modified (default: PATH)
|
||||||
stty erase `tput kbs`
|
pathremove () {
|
||||||
|
local IFS=':'
|
||||||
|
local NEWPATH
|
||||||
|
local DIR
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
for DIR in ${!PATHVARIABLE} ; do
|
||||||
|
if [ "$DIR" != "$1" ] ; then
|
||||||
|
NEWPATH=${NEWPATH:+$NEWPATH:}$DIR
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
export $PATHVARIABLE="$NEWPATH"
|
||||||
|
}
|
||||||
|
|
||||||
|
pathprepend () {
|
||||||
|
pathremove $1 $2
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
export $PATHVARIABLE="$1${!PATHVARIABLE:+:${!PATHVARIABLE}}"
|
||||||
|
}
|
||||||
|
|
||||||
|
pathappend () {
|
||||||
|
pathremove $1 $2
|
||||||
|
local PATHVARIABLE=${2:-PATH}
|
||||||
|
export $PATHVARIABLE="${!PATHVARIABLE:+${!PATHVARIABLE}:}$1"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
# Set the initial path
|
||||||
|
export PATH=/bin:/usr/bin
|
||||||
|
|
||||||
|
if [ $EUID -eq 0 ] ; then
|
||||||
|
pathappend /sbin:/usr/sbin
|
||||||
|
unset HISTFILE
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Setup some environment variables.
|
||||||
|
export HISTSIZE=1000
|
||||||
|
export HISTIGNORE="&:[bf]g:exit"
|
||||||
|
#export PS1="[\u@\h \w]\\$ "
|
||||||
|
export PS1='\u@\h:\w\$ '
|
||||||
|
|
||||||
|
for script in /etc/profile.d/*.sh ; do
|
||||||
|
if [ -r $script ] ; then
|
||||||
|
. $script
|
||||||
fi
|
fi
|
||||||
fi
|
done
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Path manipulation
|
# Now to clean up
|
||||||
PATH="/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin"
|
unset pathremove pathprepend pathappend
|
||||||
|
|
||||||
# No core files by default
|
# End /etc/profile
|
||||||
ulimit -S -c 0 > /dev/null 2>&1
|
|
||||||
|
|
||||||
USER=`id -un`
|
|
||||||
LOGNAME=$USER
|
|
||||||
|
|
||||||
HOSTNAME=`/bin/hostname`
|
|
||||||
HISTSIZE=250
|
|
||||||
|
|
||||||
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ]; then
|
|
||||||
INPUTRC=/etc/inputrc
|
|
||||||
fi
|
|
||||||
|
|
||||||
export PATH USER LOGNAME HOSTNAME HISTSIZE INPUTRC
|
|
||||||
|
|
||||||
# LS Colors
|
|
||||||
alias dir='ls'
|
|
||||||
alias ll='ls -l --color=tty'
|
|
||||||
alias ls='ls --color=tty'
|
|
||||||
|
|
||||||
# IPFire language settings
|
|
||||||
LANG=en_US.utf8
|
|
||||||
PS1='\[\033[1;33m\]\u\[\033[1;37m\]@\[\033[1;32m\]\h\[\033[1;37m\]:\[\033[1;31m\]\w \[\033[1;36m\]\$ \[\033[0m\]'
|
|
||||||
echo -n -e '\033%G'
|
|
||||||
|
|
||||||
export LANG PS1
|
|
||||||
export TERM=linux
|
|
||||||
export COLORTERM=1
|
|
||||||
|
|||||||
9
config/profile.d/dircolors.sh
Normal file
9
config/profile.d/dircolors.sh
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
# Setup for /bin/ls to support color, the alias is in /etc/bashrc.
|
||||||
|
if [ -f "/etc/dircolors" ] ; then
|
||||||
|
eval $(dircolors -b /etc/dircolors)
|
||||||
|
|
||||||
|
if [ -f "$HOME/.dircolors" ] ; then
|
||||||
|
eval $(dircolors -b $HOME/.dircolors)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
alias ls='ls --color=auto'
|
||||||
2
config/profile.d/extra-promt.sh
Normal file
2
config/profile.d/extra-promt.sh
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
PROMPT_COMMAND='echo -ne "\e[1m${USER}@${HOSTNAME} : ${PWD}\e[0m\a"'
|
||||||
|
export PROMPT_COMMAND
|
||||||
15
config/profile.d/extrapaths.sh
Normal file
15
config/profile.d/extrapaths.sh
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
if [ -d /usr/local/bin ]; then
|
||||||
|
pathprepend /usr/local/bin
|
||||||
|
fi
|
||||||
|
if [ -d /usr/local/sbin -a $EUID -eq 0 ]; then
|
||||||
|
pathprepend /usr/local/sbin
|
||||||
|
fi
|
||||||
|
for directory in $(find /opt/*/bin -type d 2>/dev/null); do
|
||||||
|
pathappend $directory
|
||||||
|
done
|
||||||
|
if [ -d ~/bin ]; then
|
||||||
|
pathprepend ~/bin
|
||||||
|
fi
|
||||||
|
#if [ $EUID -gt 99 ]; then
|
||||||
|
# pathappend .
|
||||||
|
#fi
|
||||||
5
config/profile.d/readline.sh
Normal file
5
config/profile.d/readline.sh
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Setup the INPUTRC environment variable.
|
||||||
|
if [ -z "$INPUTRC" -a ! -f "$HOME/.inputrc" ] ; then
|
||||||
|
INPUTRC=/etc/inputrc
|
||||||
|
fi
|
||||||
|
export INPUTRC
|
||||||
6
config/profile.d/umask.sh
Normal file
6
config/profile.d/umask.sh
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
# By default we want the umask to get set.
|
||||||
|
if [ "$(id -gn)" = "$(id -un)" -a $EUID -gt 99 ] ; then
|
||||||
|
umask 002
|
||||||
|
else
|
||||||
|
umask 022
|
||||||
|
fi
|
||||||
@@ -22,6 +22,7 @@ bin/sync
|
|||||||
bin/true
|
bin/true
|
||||||
#bin/uname
|
#bin/uname
|
||||||
bin/uname.bak
|
bin/uname.bak
|
||||||
|
etc/dircolors
|
||||||
usr/bin/[
|
usr/bin/[
|
||||||
usr/bin/basename
|
usr/bin/basename
|
||||||
#usr/bin/cksum
|
#usr/bin/cksum
|
||||||
|
|||||||
@@ -18,6 +18,7 @@ etc/rc.d/init.d/modules
|
|||||||
etc/rc.d/init.d/mountfs
|
etc/rc.d/init.d/mountfs
|
||||||
etc/rc.d/init.d/mountkernfs
|
etc/rc.d/init.d/mountkernfs
|
||||||
etc/rc.d/init.d/network
|
etc/rc.d/init.d/network
|
||||||
|
etc/rc.d/init.d/random
|
||||||
etc/rc.d/init.d/rc
|
etc/rc.d/init.d/rc
|
||||||
etc/rc.d/init.d/reboot
|
etc/rc.d/init.d/reboot
|
||||||
etc/rc.d/init.d/red
|
etc/rc.d/init.d/red
|
||||||
@@ -34,6 +35,7 @@ etc/rc.d/init.d/udev_retry
|
|||||||
etc/rc.d/rc0.d/K08fcron
|
etc/rc.d/rc0.d/K08fcron
|
||||||
etc/rc.d/rc0.d/K28apache
|
etc/rc.d/rc0.d/K28apache
|
||||||
etc/rc.d/rc0.d/K30sshd
|
etc/rc.d/rc0.d/K30sshd
|
||||||
|
etc/rc.d/rc0.d/K45random
|
||||||
etc/rc.d/rc0.d/K80network
|
etc/rc.d/rc0.d/K80network
|
||||||
etc/rc.d/rc0.d/K90sysklogd
|
etc/rc.d/rc0.d/K90sysklogd
|
||||||
etc/rc.d/rc0.d/S60sendsignals
|
etc/rc.d/rc0.d/S60sendsignals
|
||||||
@@ -44,6 +46,7 @@ etc/rc.d/rc0.d/S99halt
|
|||||||
#etc/rc.d/rc3.d
|
#etc/rc.d/rc3.d
|
||||||
etc/rc.d/rc3.d/S10sysklogd
|
etc/rc.d/rc3.d/S10sysklogd
|
||||||
etc/rc.d/rc3.d/S20network
|
etc/rc.d/rc3.d/S20network
|
||||||
|
etc/rc.d/rc3.d/S25random
|
||||||
etc/rc.d/rc3.d/S30sshd
|
etc/rc.d/rc3.d/S30sshd
|
||||||
etc/rc.d/rc3.d/S32apache
|
etc/rc.d/rc3.d/S32apache
|
||||||
etc/rc.d/rc3.d/S40fcron
|
etc/rc.d/rc3.d/S40fcron
|
||||||
@@ -51,6 +54,7 @@ etc/rc.d/rc3.d/S40fcron
|
|||||||
etc/rc.d/rc6.d/K08fcron
|
etc/rc.d/rc6.d/K08fcron
|
||||||
etc/rc.d/rc6.d/K28apache
|
etc/rc.d/rc6.d/K28apache
|
||||||
etc/rc.d/rc6.d/K30sshd
|
etc/rc.d/rc6.d/K30sshd
|
||||||
|
etc/rc.d/rc6.d/K45random
|
||||||
etc/rc.d/rc6.d/K80network
|
etc/rc.d/rc6.d/K80network
|
||||||
etc/rc.d/rc6.d/K90sysklogd
|
etc/rc.d/rc6.d/K90sysklogd
|
||||||
etc/rc.d/rc6.d/S60sendsignals
|
etc/rc.d/rc6.d/S60sendsignals
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ bin/stty
|
|||||||
#boot
|
#boot
|
||||||
dev/null
|
dev/null
|
||||||
dev/console
|
dev/console
|
||||||
|
etc/bashrc
|
||||||
etc/certparams
|
etc/certparams
|
||||||
etc/fstab
|
etc/fstab
|
||||||
etc/group
|
etc/group
|
||||||
@@ -23,6 +24,11 @@ etc/nsswitch.conf
|
|||||||
#etc/opt
|
#etc/opt
|
||||||
etc/passwd
|
etc/passwd
|
||||||
etc/profile
|
etc/profile
|
||||||
|
etc/profile.d/dircolors.sh
|
||||||
|
etc/profile.d/extra-promt.sh
|
||||||
|
etc/profile.d/extrapaths.sh
|
||||||
|
etc/profile.d/readline.sh
|
||||||
|
etc/profile.d/umask.sh
|
||||||
etc/resolv.conf
|
etc/resolv.conf
|
||||||
etc/securetty
|
etc/securetty
|
||||||
etc/sysctl.conf
|
etc/sysctl.conf
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ ifeq "$(ROOT)" ""
|
|||||||
echo '#!/bin/bash' > /bin/uname
|
echo '#!/bin/bash' > /bin/uname
|
||||||
echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g'' >> /bin/uname
|
echo '/bin/uname.bak $$* | sed 's/i.86/$(MACHINE)/g'' >> /bin/uname
|
||||||
chmod 755 /bin/uname
|
chmod 755 /bin/uname
|
||||||
|
dircolors -p > /etc/dircolors
|
||||||
else
|
else
|
||||||
rm /tools/bin/hostname
|
rm /tools/bin/hostname
|
||||||
mv -f /tools/bin/uname /tools/bin/uname.bak
|
mv -f /tools/bin/uname /tools/bin/uname.bak
|
||||||
|
|||||||
@@ -97,6 +97,9 @@ $(TARGET) :
|
|||||||
ln -sf ../init.d/network /etc/rc.d/rc0.d/K80network
|
ln -sf ../init.d/network /etc/rc.d/rc0.d/K80network
|
||||||
ln -sf ../init.d/network /etc/rc.d/rc3.d/S20network
|
ln -sf ../init.d/network /etc/rc.d/rc3.d/S20network
|
||||||
ln -sf ../init.d/network /etc/rc.d/rc6.d/K80network
|
ln -sf ../init.d/network /etc/rc.d/rc6.d/K80network
|
||||||
|
ln -sf ../init.d/random /etc/rc.d/rc0.d/K45random
|
||||||
|
ln -sf ../init.d/random /etc/rc.d/rc3.d/S25random
|
||||||
|
ln -sf ../init.d/random /etc/rc.d/rc6.d/K45random
|
||||||
|
|
||||||
ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
|
ln -sf ../init.d/mountkernfs /etc/rc.d/rcsysinit.d/S00mountkernfs
|
||||||
ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules
|
ln -sf ../init.d/modules /etc/rc.d/rcsysinit.d/S05modules
|
||||||
|
|||||||
@@ -79,6 +79,11 @@ $(TARGET) :
|
|||||||
echo "===============================" >> /etc/issue
|
echo "===============================" >> /etc/issue
|
||||||
echo "\n running on \s \r \m" >> /etc/issue
|
echo "\n running on \s \r \m" >> /etc/issue
|
||||||
|
|
||||||
|
# Bash startup files
|
||||||
|
install --directory --mode=0755 --owner=root --group=root /etc/profile.d
|
||||||
|
for i in $(DIR_SRC)/config/profile.d/*; do \
|
||||||
|
[ -f $$i ] && cp $$i /etc/profile.d; \
|
||||||
|
done
|
||||||
|
|
||||||
# Scripts
|
# Scripts
|
||||||
for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \
|
for i in `find $(DIR_SRC)/src/scripts -maxdepth 1 -type f`; do \
|
||||||
|
|||||||
23
make.sh
23
make.sh
@@ -917,13 +917,13 @@ uploadsrc)
|
|||||||
PWD=`pwd`
|
PWD=`pwd`
|
||||||
cd $BASEDIR/cache/
|
cd $BASEDIR/cache/
|
||||||
echo -e "Uploading cache to ftp server:"
|
echo -e "Uploading cache to ftp server:"
|
||||||
ncftpls -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT ftp://$IPFIRE_FTP_URL_INT$IPFIRE_FTP_PATH_INT/ > /var/tmp/ftplist
|
ncftpls -u $FTP_CACHE_USER -p $FTP_CACHE_PASS ftp://$FTP_CACHE_URL$FTP_CACHE_PATH/ > /var/tmp/ftplist
|
||||||
for i in *; do
|
for i in *; do
|
||||||
if [ "$i" == "toolchains" ]; then continue; fi
|
if [ "$i" == "toolchains" ]; then continue; fi
|
||||||
grep -q $i /var/tmp/ftplist
|
grep -q $i /var/tmp/ftplist
|
||||||
if [ "$?" -ne "0" ]; then
|
if [ "$?" -ne "0" ]; then
|
||||||
echo -ne "$i"
|
echo -ne "$i"
|
||||||
ncftpput -bb -u $IPFIRE_FTP_USER_INT -p $IPFIRE_FTP_PASS_INT $IPFIRE_FTP_URL_INT $IPFIRE_FTP_PATH_INT/ $i >> $BASEDIR/log/_build.uploadsrc.log 2>&1
|
ncftpput -u $FTP_CACHE_USER -p $FTP_CACHE_PASS $FTP_CACHE_URL $FTP_CACHE_PATH/ $i
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
beautify message DONE
|
beautify message DONE
|
||||||
else
|
else
|
||||||
@@ -932,15 +932,6 @@ uploadsrc)
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
rm -f /var/tmp/ftplist
|
rm -f /var/tmp/ftplist
|
||||||
UL_TIME_START=`date +'%s'`
|
|
||||||
ncftpbatch -d > /dev/null 2>&1
|
|
||||||
while ps acx | grep -q ncftpbatch
|
|
||||||
do
|
|
||||||
UL_TIME=$(expr `date +'%s'` - $UL_TIME_START)
|
|
||||||
echo -ne "\r ${UL_TIME}s : Upload is running..."
|
|
||||||
sleep 1
|
|
||||||
done
|
|
||||||
beautify message DONE
|
|
||||||
cd $PWD
|
cd $PWD
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
@@ -956,10 +947,10 @@ EOF
|
|||||||
ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands
|
ncftp -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT < .ftp-commands
|
||||||
rm -f .ftp-commands
|
rm -f .ftp-commands
|
||||||
md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5
|
md5sum ipfire-install-$VERSION.i386.iso > ipfire-install-$VERSION.i386.iso.md5
|
||||||
ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso
|
ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-install-$VERSION.i386.iso
|
||||||
ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-install-$VERSION.i386.iso.md5
|
ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-install-$VERSION.i386.iso.md5
|
||||||
ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-source-r$SVN_REVISION.tar.gz
|
ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-source-r$SVN_REVISION.tar.gz
|
||||||
ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ svn_status
|
ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ svn_status
|
||||||
if [ "$?" -eq "0" ]; then
|
if [ "$?" -eq "0" ]; then
|
||||||
echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/."
|
echo -e "The iso of Revision $SVN_REVISION was successfully uploaded to $IPFIRE_FTP_URL_EXT$IPFIRE_FTP_PATH_EXT/."
|
||||||
else
|
else
|
||||||
@@ -967,7 +958,7 @@ EOF
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
if [ "$3" = "--with-sources-cd" ]; then
|
if [ "$3" = "--with-sources-cd" ]; then
|
||||||
ncftpput -u $IPFIRE_FTP_USER_EXT -p $IPFIRE_FTP_PASS_EXT $IPFIRE_FTP_URL_EXT $IPFIRE_FTP_PATH_EXT/ ipfire-sources-cd-$VERSION.$MACHINE.iso
|
ncftpput -u $FTP_ISO_USER -p $FTP_ISO_PASS $FTP_ISO_URL $FTP_ISO_PATH/ ipfire-sources-cd-$VERSION.$MACHINE.iso
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
paks)
|
paks)
|
||||||
|
|||||||
35
src/initscripts/init.d/random
Normal file
35
src/initscripts/init.d/random
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Begin $rc_base/init.d/random
|
||||||
|
|
||||||
|
# Based on sysklogd script from LFS-3.1 and earlier.
|
||||||
|
# Rewritten by Gerard Beekmans - gerard@linuxfromscratch.org
|
||||||
|
# Random script elements by Larry Lawrence
|
||||||
|
|
||||||
|
. /etc/sysconfig/rc
|
||||||
|
. $rc_functions
|
||||||
|
|
||||||
|
case "$1" in
|
||||||
|
start)
|
||||||
|
boot_mesg "Initializing kernel random number generator..."
|
||||||
|
if [ -f /var/tmp/random-seed ]; then
|
||||||
|
/bin/cat /var/tmp/random-seed >/dev/urandom
|
||||||
|
fi
|
||||||
|
/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
|
||||||
|
count=1 &>/dev/null
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
stop)
|
||||||
|
boot_mesg "Saving random seed..."
|
||||||
|
/bin/dd if=/dev/urandom of=/var/tmp/random-seed \
|
||||||
|
count=1 &>/dev/null
|
||||||
|
evaluate_retval
|
||||||
|
;;
|
||||||
|
|
||||||
|
*)
|
||||||
|
echo "Usage: $0 {start|stop}"
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# End $rc_base/init.d/random
|
||||||
@@ -123,7 +123,7 @@ beautify()
|
|||||||
;;
|
;;
|
||||||
build_end)
|
build_end)
|
||||||
BUILD_TIME_END=`date +%s`
|
BUILD_TIME_END=`date +%s`
|
||||||
echo -ne "${BOLD}***Build is finished now!\nThis took:\t\t\t $[ $BUILD_TIME_END - $BUILD_TIME_START ] (secs)${NORMAL}\n"
|
echo -ne "${DONE}***Build is finished now and took $[ $BUILD_TIME_END - $BUILD_TIME_START ] secs!${NORMAL}\n"
|
||||||
;;
|
;;
|
||||||
make_pkg)
|
make_pkg)
|
||||||
echo "$2" | while read PKG_VER PROGRAM OPTIONS
|
echo "$2" | while read PKG_VER PROGRAM OPTIONS
|
||||||
|
|||||||
Reference in New Issue
Block a user