Skip to content

Commit

Permalink
Minor changes and removed reference to blacklist.t
Browse files Browse the repository at this point in the history
  • Loading branch information
britannic committed Jan 23, 2018
1 parent 4f5512a commit ec0fe05
Show file tree
Hide file tree
Showing 10 changed files with 36 additions and 43 deletions.
37 changes: 16 additions & 21 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,33 +4,28 @@
# Add back files with extensions and directories
!*.*
!*/
!VERSION

!testcoverage
!.travis.yml
!testcoverage
!VERSION

# Ignore debug
*.debug
blacklist.*
*.amd64
*.mips
*.mipsel

# Ignore test
*.test

.idea/
.vscode/
vendor/
# Ignore
.coveralls.yml
.DS_Store
.git.bfg-report/
.idea/
.payload/config/scripts/update-dnsmasq
.vscode/
*.amd64
*.bak
*.bkp
*.deb
*.debug
*.lock
*.log
*.VC.db
*.mips
*.mipsel
*.out
*.deb
.git.bfg-report/

.payload/config/scripts/update-dnsmasq
*.test
*.VC.db
blacklist.*
vendor/
16 changes: 7 additions & 9 deletions .payload/post-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,31 +64,31 @@ echo_logger() {
case "${1}" in
E)
shift
MSG="$(red)$(bold)ERRO$(normal)[${CTR}]${TIME} ${@} failed!"
MSG="$(red)$(bold)ERRO$(normal)[${CTR}]${TIME}: ${@} failed!"
;;
F)
shift
MSG="$(red)$(bold)FAIL$(normal)[${CTR}]${TIME} ${@}"
MSG="$(red)$(bold)FAIL$(normal)[${CTR}]${TIME}: ${@}"
;;
FE)
shift
MSG="$(red)$(bold)CRIT$(normal)[${CTR}]${TIME} ${@}"
MSG="$(red)$(bold)CRIT$(normal)[${CTR}]${TIME}: ${@}"
;;
I)
shift
MSG="$(green)INFO$(normal)[${CTR}]${TIME} ${@}"
MSG="$(green)INFO$(normal)[${CTR}]${TIME}: ${@}"
;;
S)
shift
MSG="$(green)$(bold)NOTI$(normal)[${CTR}]${TIME} ${@}"
MSG="$(green)$(bold)NOTI$(normal)[${CTR}]${TIME}: ${@}"
;;
T)
shift
MSG="$(tan)$(bold)TRYI$(normal)[${CTR}]${TIME} ${@}"
MSG="$(tan)$(bold)TRYI$(normal)[${CTR}]${TIME}: ${@}"
;;
W)
shift
MSG="$(yellow)$(bold)WARN$(normal)[${CTR}]${TIME} ${@}"
MSG="$(yellow)$(bold)WARN$(normal)[${CTR}]${TIME}: ${@}"
;;
*)
echo "ERROR: usage: echo_logger MSG TYPE(E, F, FE, I, S, T, W) MSG."
Expand Down Expand Up @@ -240,5 +240,3 @@ update_dns_configuration() {

update_dns_configuration
try chgrp -R vyattacfg /opt/vyatta/config/active

echo -e ${msg}
14 changes: 7 additions & 7 deletions .payload/pre-remove.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,31 +57,31 @@ echo_logger() {
case "${1}" in
E)
shift
MSG="$(red)$(bold)ERRO$(normal)[${CTR}]${TIME} ${@} failed!"
MSG="$(red)$(bold)ERRO$(normal)[${CTR}]${TIME}: ${@} failed!"
;;
F)
shift
MSG="$(red)$(bold)FAIL$(normal)[${CTR}]${TIME} ${@}"
MSG="$(red)$(bold)FAIL$(normal)[${CTR}]${TIME}: ${@}"
;;
FE)
shift
MSG="$(red)$(bold)CRIT$(normal)[${CTR}]${TIME} ${@}"
MSG="$(red)$(bold)CRIT$(normal)[${CTR}]${TIME}: ${@}"
;;
I)
shift
MSG="$(green)INFO$(normal)[${CTR}]${TIME} ${@}"
MSG="$(green)INFO$(normal)[${CTR}]${TIME}: ${@}"
;;
S)
shift
MSG="$(green)$(bold)NOTI$(normal)[${CTR}]${TIME} ${@}"
MSG="$(green)$(bold)NOTI$(normal)[${CTR}]${TIME}: ${@}"
;;
T)
shift
MSG="$(tan)$(bold)TRYI$(normal)[${CTR}]${TIME} ${@}"
MSG="$(tan)$(bold)TRYI$(normal)[${CTR}]${TIME}: ${@}"
;;
W)
shift
MSG="$(yellow)$(bold)WARN$(normal)[${CTR}]${TIME} ${@}"
MSG="$(yellow)$(bold)WARN$(normal)[${CTR}]${TIME}: ${@}"
;;
*)
echo "ERROR: usage: echo_logger MSG TYPE(E, F, FE, I, S, T, W) MSG."
Expand Down
Binary file removed edgeos-dnsmasq-blacklist_0.0.6_mips.deb
Binary file not shown.
Binary file removed edgeos-dnsmasq-blacklist_0.0.6_mipsel.deb
Binary file not shown.
Binary file modified edgeos-dnsmasq-blacklist_0.0.7_mips.deb
Binary file not shown.
Binary file modified edgeos-dnsmasq-blacklist_0.0.7_mips.deb.tgz
Binary file not shown.
Binary file modified edgeos-dnsmasq-blacklist_0.0.7_mipsel.deb
Binary file not shown.
Binary file modified edgeos-dnsmasq-blacklist_0.0.7_mipsel.deb.tgz
Binary file not shown.
12 changes: 6 additions & 6 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ var (
exitCmd(1)
}

logFile = fmt.Sprintf("/var/log/%s.log", progname)
logInfo = log.Info
logInfof = log.Infof
logNotice = log.Notice
logFile = fmt.Sprintf("/var/log/%s.log", progname)
logInfo = log.Info
logInfof = log.Infof
// logNotice = log.Notice
logPrintf = logInfof
// logPrintln = logInfo

Expand Down Expand Up @@ -165,7 +165,7 @@ func newLog() *logging.Logger {
logFile = fmt.Sprintf("/tmp/%s.log", progname)
}
fdFmt := logging.MustStringFormatter(
`%{level:.4s}[%{id:03x}]%{time:2006-01-02 15:04:05.000}{` + progname + `} %{message}`,
`%{level:.4s}[%{id:03x}]%{time:2006-01-02 15:04:05.000}{` + progname + `}: %{message}`,
)

fd, err := os.OpenFile(logFile, os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
Expand Down Expand Up @@ -227,7 +227,7 @@ func screenLog() {
logFile = fmt.Sprintf("/tmp/%s.log", progname)
}
scrFmt := logging.MustStringFormatter(
`%{color:bold}%{level:.4s}%{color:reset}[%{id:03x}]%{time:15:04:05.000} %{message}`,
`%{color:bold}%{level:.4s}%{color:reset}[%{id:03x}]%{time:15:04:05.000}: %{message}`,
)

scr := logging.NewLogBackend(os.Stderr, progname+": ", 0)
Expand Down

0 comments on commit ec0fe05

Please sign in to comment.