[[FreeBSD /var が溢れました]]

#contents
* portupgrade -ar --batch [#y7f9045d]

   957  14:55   postfix reload
   958  14:56   apachectl restart
   959  14:56   /usr/local/etc/rc.d/mysql-server restart
   960  14:56   mysql_upgrade -u root -p
   961  14:57   /usr/local/etc/rc.d/mailman restart
   962  14:57   reboot



* .cshrc [#m37cfb3b]

root@guard:~:17_01_23:12:15 #


 if ($?prompt) then
	# An interactive shell -- set some stuff up
	set prompt = "%N@%m:%~:%y_%W_%D:%T %# "
	set promptchars = "%#"
 
	set filec
	set history = 1000
	set savehist = (1000 merge)
	set autolist = ambiguous
	# Use history to aid expansion
	set autoexpand
	set autorehash
	set mail = (/var/mail/$USER)
	if ( $?tcsh ) then
		bindkey "^W" backward-delete-word
		bindkey -k up history-search-backward
		bindkey -k down history-search-forward
 	endif
 
 endif


*--More--(END) [#zf0acd10]

 # /usr/sbin/freebsd-update fetch
 Looking up update.FreeBSD.org mirrors... none found.
 Fetching metadata signature for 10.3-RELEASE from update.FreeBSD.org... done.
 Fetching metadata index... done.
 Inspecting system... done.
 Preparing to download files... done.
 --More--(END)

10.2 以降で、キー入力が要るようになった?。

** etenv PAGER cat && を追加 [#l906cb37]

/root/bin/check.sh

 #/bin/sh!
 setenv PAGER cat && \
 /usr/sbin/freebsd-update fetch && \
 /usr/sbin/freebsd-update install ; \
 /usr/sbin/portsnap fetch update && \
 /usr/local/sbin/portversion -vl'<' && \
 /usr/sbin/pkg audit -F

** 実行するユーザの、.cshrc を [#c94e6294]

#setenv	PAGER	more
 setenv	PAGER	cat

とすると途中でキー入力は不用となったょ。ただ、これだと、何でもかんでもcatになる・・・。


ほかには、こんな記事も・・・

https://www.reddit.com/r/freebsd/comments/4den7j/freebsdupdate_fetch_has_moreend_at_the_end/

 PAGER=cat freebsd-update ...
or if you do want paging when there's more than a screenful,
 PAGER='less -F' freebsd-update ...



Added the -F to the PAGER= line in /usr/sbin/freebsd-update and it works like before now.
 # Set a pager if the user doesn't
 if [ -z "$PAGER" ]; then
     PAGER='/usr/bin/more -F'
 fi












*freebsd-update [#t648ec68]
**k222 de FreeBSD 7.1 を 7.2にしてみる。 [#i47a3f1f]
 k222# uname -a
 FreeBSD k222.kuji-clinic.net 7.1-RELEASE-p10 FreeBSD 7.1-RELEASE-p10 #0: Wed Jan 27 06:51:40 JST 2010     root@k222.kuji-clinic.net:/usr/obj/usr/src/sys/GENERIC  amd64
 k222# freebsd-update -r 7.2-RELEASE upgrade
 Looking up update.FreeBSD.org mirrors... 3 mirrors found.
 Fetching metadata signature for 7.1-RELEASE from update5.FreeBSD.org... done.
 Fetching metadata index... done.
 Fetching 2 metadata patches.. done.
 Applying metadata patches... done.
 Fetching 1 metadata files... done.
 Inspecting system... done.
 
 The following components of FreeBSD seem to be installed:
 kernel/generic src/base src/bin src/cddl src/contrib src/crypto src/etc
 src/games src/gnu src/include src/krb5 src/lib src/libexec src/release
 src/rescue src/sbin src/secure src/share src/sys src/tools src/ubin
 src/usbin world/base world/catpages world/dict world/doc world/games
 world/info world/lib32 world/manpages world/proflibs
 
 The following components of FreeBSD do not seem to be installed: 
 
 Does this look reasonable (y/n)? y
 
 Fetching metadata signature for 7.2-RELEASE from update5.FreeBSD.org... done.
 Fetching metadata index... done.
 Fetching 1 metadata patches. done.
 Applying metadata patches... done.
 Fetching 1 metadata files... done.
 Inspecting system...
 Fetching files from 7.1-RELEASE for merging... done.
 Preparing to download files... done.
 Fetching 27 patches.....10....20... done.
 Applying patches... done.
 Fetching 44 files... done.
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 /usr/sbin/freebsd-update: cannot open files/.gz: No such file or directory
 Attempting to automatically merge changes in files... done.
 
 The following file could not be merged automatically: /etc/hosts
 Press Enter to edit this file in vi and resolve the conflicts
 manually...

 k222# freebsd-update install
 Installing updates...
 
 Kernel updates have been installed.  Please reboot and run
 "/usr/sbin/freebsd-update install" again to finish installing updates.
 k222#

 k222# /usr/sbin/freebsd-update install
 Installing updates...ln: ///.profile: No such file or directory
 install: ///usr/share/doc/de_DE.ISO8859-1/books/porters-handbook/using-databases.html: No such file or directory
 install: ///usr/share/doc/de_DE.ISO8859-1/books/porters-handbook/using-tcl.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/mirrors-bittorrent.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/network-syslogd.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-documentation.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-freebsdupdate.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-portsnap.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading.html: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat4/hptrr.4.gz: No such file or directory
 ln: ///usr/share/man/cat4/SW_WATCHDOG.4.gz: No such file or directory
 ln: ///usr/share/man/cat7/securelevel.7.gz: No such file or directory
 done.
 k222#
 k222# uname -a
 FreeBSD k222.kuji-clinic.net 7.2-RELEASE-p8 FreeBSD 7.2-RELEASE-p8 #0: Tue May 25 17:51:43 UTC 2010
 root@amd64-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  amd64



----
FreeBSD 7.1 を 7.2にしてみる。
 flora# df
 Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
 /dev/ad0s1a    507630   314650    152370    67%    /
 devfs               1        1         0   100%    /dev
 /dev/ad0s1e    507630       16    467004     0%    /tmp
 /dev/ad0s1f 300010694 11894074 264115766     4%    /usr
 /dev/ad0s1d   1243598   909826    234286    80%    /var
 devfs               1        1         0   100%    /var/named/dev
flora では、/var が /var/db/freebsd-update で圧迫されているので、

flora
 flora# mkdir /usr/freebsd-update
 flora# cd /var/db/freebsd-update/
 flora# cp -Rp * /usr/freebsd-update/
 flora# rm -R freebsd-update/
 flora# ln -s /usr/freebsd-update freebsd-update
して、
 flora# df
 Filesystem  1K-blocks     Used     Avail Capacity  Mounted on
 /dev/ad0s1a    507630   314650    152370    67%    /
 devfs               1        1         0   100%    /dev
 /dev/ad0s1e    507630       16    467004     0%    /tmp
 /dev/ad0s1f 300010694 12514198 263495642     5%    /usr
 /dev/ad0s1d   1243598   289744    854368    25%    /var
 devfs               1        1         0   100%    /var/named/dev

しておく。
 freebsd-update -r 7.2-RELEASE upgrade

**/etc/crontab [#i0cf4c35]
 /etc/crontab
 30	3	*	*	*	root	/root/CVSUP/7_2/cvsup-releng_7_2.sh


**flora# freebsd-update -r 7.2-RELEASE upgrade [#rf31f266]
 Looking up update.FreeBSD.org mirrors... 3 mirrors found.
 Fetching metadata signature for 7.1-RELEASE from update5.FreeBSD.org... done.
 Fetching metadata index... done.
 Fetching 2 metadata patches.. done.
 Applying metadata patches... done.
 Inspecting system... done.
 
 The following components of FreeBSD seem to be installed:
 kernel/generic src/base src/bin src/cddl src/contrib src/crypto src/etc
 src/games src/gnu src/include src/krb5 src/lib src/libexec src/release
 src/rescue src/sbin src/secure src/share src/sys src/tools src/ubin
 src/usbin world/base world/catpages world/dict world/doc world/games
 world/info world/manpages world/proflibs
 
 The following components of FreeBSD do not seem to be installed:
 
 Does this look reasonable (y/n)? y
 
 Fetching metadata signature for 7.2-RELEASE from update5.FreeBSD.org... done.
 Fetching metadata index... done.
 Fetching 1 metadata patches. done.
 Applying metadata patches... done.
 Fetching 1 metadata files... done.
 Inspecting system... done.
 Fetching files from 7.1-RELEASE for merging... done.
 Preparing to download files...
 File changed while FreeBSD Update running: /etc/crontab
 flora#


freebsd-update install
 k222# freebsd-update install
 Installing updates...
 Kernel updates have been installed.  Please reboot and run
 "/usr/sbin/freebsd-update install" again to finish installing updates.
k222#
 k222# freebsd-update install
 Installing updates...ln: ///root/.profile: Cross-device link
 install: ///usr/share/doc/de_DE.ISO8859-1/books/porters-handbook/using-databases.html: No such file or directory
 install: ///usr/share/doc/de_DE.ISO8859-1/books/porters-handbook/using-tcl.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/mirrors-bittorrent.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/network-syslogd.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-documentation.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-freebsdupdate.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading-portsnap.html: No such file or directory
 install: ///usr/share/doc/mn_MN.UTF-8/books/handbook/updating-upgrading.html:  No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat3/archive_clear_error.3.gz: No such file or directory
 ln: ///usr/share/man/cat4/hptrr.4.gz: No such file or directory
 ln: ///usr/share/man/cat4/SW_WATCHDOG.4.gz: No such file or directory
 ln: ///usr/share/man/cat7/securelevel.7.gz: No such file or directory
 done.
 k222#

トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS