Server IP : 195.201.23.43 / Your IP : 3.144.29.148 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /proc/thread-self/root/etc/etckeeper/update-ignore.d/ |
Upload File : |
#!/bin/sh set -e if [ "$VCS" = git ]; then dir=.git file=.gitignore elif [ "$VCS" = hg ]; then dir=.hg file=.hgignore elif [ "$VCS" = bzr ]; then dir=.bzr file=.bzrignore elif [ "$VCS" = darcs ]; then dir=_darcs file=.darcsignore else echo "etckeeper: unsupported VCS $VCS" >&2 exit 1 fi if [ ! -d "$dir" ]; then exit 0 fi managed_by_etckeeper="managed by etckeeper" nl() { echo >>"$file" } comment() { comment="$1" echo "# $comment" >>"$file" } ignore() { glob="$1" case "$VCS" in git) # escape "#" in ignores, as otherwise it may # be considered a comment echo "$glob" | sed 's/#/\\#/g' >>"$file" ;; bzr) echo "$glob" >>"$file" ;; hg) # rather than converting the glob to a regexp, just # configure hg to use globs if [ -z "$hg_syntax_printed" ]; then comment "use glob syntax" echo "syntax: glob" >>"$file" nl hg_syntax_printed=1 fi echo "$glob" | sed 's/#/\\#/g' >>"$file" ;; darcs) # darcs doesn't understand globs, so we need to # translate them into regexs. Not a complete converter, # but suitable for given globs. if [ "${glob%\*}" != "$glob" ]; then glob="${glob%\*}" else glob="$glob"'($|/)' fi if [ "${glob#\*}" != "$glob" ]; then glob="${glob#\*}" else glob='(^|/)'"$glob" fi glob="$( printf %s $glob | sed -e 's/\./\\./g;s/\*/[^\/]*/g;s/\?/[^\/]/g' )" echo "$glob" >>"$file" esac } writefile () { comment "begin section $managed_by_etckeeper (do not edit this section by hand)" nl if [ "$VCS" = darcs ]; then darcs setpref boringfile .darcsignore fi if [ "$LOWLEVEL_PACKAGE_MANAGER" = dpkg ]; then comment "new and old versions of conffiles, stored by dpkg" ignore "*.dpkg-*" comment "new and old versions of conffiles, stored by ucf" ignore "*.ucf-*" nl elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "rpm" ]; then comment "new and old versions of conffiles, stored by apt/rpm" ignore "*.rpm*" nl elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "pacman-g2" -o "$LOWLEVEL_PACKAGE_MANAGER" = "pacman" -o "$LOWLEVEL_PACKAGE_MANAGER" = "pacmatic" ]; then comment "new and old versions of conffiles, stored by pacman" ignore "*.pacnew" ignore "*.pacorig" ignore "*.pacsave" nl elif [ "$LOWLEVEL_PACKAGE_MANAGER" = "apk" ]; then comment "new versions of conffiles, stored by apk" ignore "*.apk-new" nl fi comment "old versions of files" ignore "*.old" # Not currently ignored as admins tend to rely on these files. #ignore "passwd-" #ignore "group-" #ignore "shadow-" #ignore "gshadow-" nl comment "mount(8) records system state here, no need to store these" ignore blkid.tab ignore blkid.tab.old nl comment "some other files in /etc that typically do not need to be tracked" ignore nologin ignore ld.so.cache ignore prelink.cache ignore mtab ignore mtab.fuselock ignore .pwd.lock ignore "*.LOCK" ignore network/run ignore adjtime ignore lvm/cache ignore lvm/archive ignore "X11/xdm/authdir/authfiles/*" ignore ntp.conf.dhcp ignore .initctl ignore "webmin/fsdump/*.status" ignore "webmin/webmin/oscache" ignore "apparmor.d/cache/*" ignore "service/*/supervise/*" ignore "service/*/log/supervise/*" ignore "sv/*/supervise/*" ignore "sv/*/log/supervise/*" ignore "*.elc" ignore "*.pyc" ignore "*.pyo" ignore "init.d/.depend.*" ignore "openvpn/openvpn-status.log" ignore "cups/subscriptions.conf" ignore "cups/subscriptions.conf.O" ignore "fake-hwclock.data" ignore "check_mk/logwatch.state" nl comment "editor temp files" ignore "*~" ignore ".*.sw?" ignore ".sw?" ignore "#*#" ignore DEADJOE nl comment "end section $managed_by_etckeeper" } if [ -e "$file" ]; then if ! grep -q "$managed_by_etckeeper" "$file"; then if [ "$1" != "-a" ]; then echo "etckeeper: "$file" does not contain \"$managed_by_etckeeper\" comment; not updating" exit 1 else echo "etckeeper: "$file" exists but does not contain \"$managed_by_etckeeper\" comment; updating" writefile exit 0 fi fi realfile="$file" if which tempfile >/dev/null 2>&1 || type tempfile >/dev/null 2>&1; then tempfile="tempfile" elif which mktemp >/dev/null 2>&1 || type mktemp >/dev/null 2>&1; then tempfile="mktemp" else echo "etckeeper warning: can't find tempfile or mktemp" >&2 fi file=$($tempfile) ( skipping= while read -r line; do if echo "$line" | grep -q "$managed_by_etckeeper"; then if [ ! "$skipping" ]; then skipping=1 else skipping= writefile fi elif [ ! "$skipping" ]; then echo "$line" >> "$file" fi done if [ "$skipping" ]; then # reached end of file w/o ending block writefile fi ) <"$realfile" mv -f "$file" "$realfile" else writefile fiPrivate