Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 259662 Details for
Bug 338509
quickpkg turns hard linked files into empty files
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Checks for zero byte files and attempts to lists or reinstalls as requested.
zerobyte-chk.sh (text/plain), 1.84 KB, created by
Roger
on 2011-01-12 23:55:20 UTC
(
hide
)
Description:
Checks for zero byte files and attempts to lists or reinstalls as requested.
Filename:
MIME Type:
Creator:
Roger
Created:
2011-01-12 23:55:20 UTC
Size:
1.84 KB
patch
obsolete
>#!/bin/bash - >#=============================================================================== ># ># FILE: zerobytefile-chk.sh ># ># USAGE: ./zerobytefile-chk.sh ># ># DESCRIPTION: Finds zero byte files in system folders and lists them ># Will also ask to attempt to reinstall package ># ># OPTIONS: --- ># REQUIREMENTS: --- ># BUGS: --- ># NOTES: --- ># AUTHOR: Roger Zauner (rdz), ># COMPANY: ># CREATED: 01/12/2011 11:49:15 AM AKST ># REVISION: --- >#=============================================================================== > >set -o nounset # Treat unset variables as an error >#set -o xtrace # Enable trace debugging > > ># Find only zero byte files, omitting /usr/src/ files >sudo find /usr -not -path "*/usr/src/*" -size 0 > /tmp/zero-byte-file.log > >sudo chmod a+r /tmp/zero-byte-file.log > ># read in this listing and find each file's package owner >{ > while read FILENAME; do > qfile ${FILENAME} > done >} < /tmp/zero-byte-file.log > /tmp/package.log > > ># Only want package name field (omit filenames causing package name to be duplicated) >cut --delimiter=" " --fields=1 < /tmp/package.log > /tmp/package.log.1 > ># get rid redundant package names ># TODO: this isn't working for some reason, debug! >uniq --unique < /tmp/package.log.1 > /tmp/package.log.2 > ># sort >sort < /tmp/package.log.2 > /tmp/package.log.3 > > ># ask to reinstall packages? >printf "These are the packages I will reinstall:\n" >cat /tmp/package.log.3 > >printf "Do you wish to reinstall these packages?\n" >printf "(This requires root privilages.)\n" >select yn in "Yes" "No"; do > case $yn in > Yes ) continue;; > No ) exit;; > esac >done > > ># reinstall packages as previously requested >for pkg_name in `< /tmp/package.log.3`; do > sudo emerge $pkg_name >done
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 338509
: 259662