Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modifed existing code to work on Ubuntu. #125

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion linux-tools/ltrace/ltrace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,12 @@ function test07()
tc_register "ltrace -L -S command"
ltrace -L -S ./ltracetest1 &>$stdout
tc_fail_if_bad $? "ltrace -L -S command failed" || return
grep -q "open@SYS" $stdout
grep -i "ubuntu" /etc/*-release >/dev/null 2>&1
if [ $? -eq 0 ];then
grep -q "SYS_open" $stdout
else
grep -q "open@SYS" $stdout
fi
tc_pass_or_fail $? "ltrace -L -S command failed"
}

Expand Down
15 changes: 13 additions & 2 deletions linux-tools/mlocate/locate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,25 @@ function tc_local_setup()
touch $locate_this

# temporarily stop cron process
tc_service_stop_and_wait crond
grep -i "ubuntu" /etc/*-release >/dev/null 2>&1
rc=$?
if [ $rc -eq 0 ];then
tc_service_stop_and_wait cron
else
tc_service_stop_and_wait crond
fi
cron_stopped="yes"
return 0
}

function tc_local_cleanup()
{
[ "$cron_stopped" = "yes" ] && tc_service_start_and_wait crond
if [ $rc -eq 0 ];then
[ "$cron_stopped" = "yes" ] && tc_service_start_and_wait cron
else
[ "$cron_stopped" = "yes" ] && tc_service_start_and_wait crond
fi

}

#
Expand Down