diff options
author | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-03-09 12:39:39 +0000 |
---|---|---|
committer | Robert Schwebel <r.schwebel@pengutronix.de> | 2008-03-09 12:39:39 +0000 |
commit | 45a5e7c10944d64ea62ae4d9659293e1ff820deb (patch) | |
tree | a4e1b7cece3c9a78887d01eae42234d2869ccddf /patches | |
parent | 84ac3d254c0582c478ef66745d1fe044e537bacb (diff) | |
download | ptxdist-45a5e7c10944d64ea62ae4d9659293e1ff820deb.tar.gz ptxdist-45a5e7c10944d64ea62ae4d9659293e1ff820deb.tar.xz |
git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@7831 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'patches')
3 files changed, 28 insertions, 183 deletions
diff --git a/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck-quoting.diff b/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck-quoting.diff deleted file mode 100644 index 637ed9797..000000000 --- a/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck-quoting.diff +++ /dev/null @@ -1,182 +0,0 @@ -From: Robert Schwebel <r.schwebel@pengutronix.de> -Subject: fix quoting in IDcheck.sh - -If one of the variables expands to nothing, the test(1) calls see the -wrong syntax. It is good shell praxis to either use - - [ "$FOO" = "bar" ] - -or - - [ x$FOO = xbar ] - -here; this patch changes the file to use the first variant. - -Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> - ---- - IDcheck.sh | 62 ++++++++++++++++++++++++++++++------------------------------- - 1 file changed, 31 insertions(+), 31 deletions(-) - -Index: ltp-full-20080229/IDcheck.sh -=================================================================== ---- ltp-full-20080229.orig/IDcheck.sh 2008-03-09 08:10:48.000000000 +0100 -+++ ltp-full-20080229/IDcheck.sh 2008-03-09 08:13:28.000000000 +0100 -@@ -45,54 +45,54 @@ - I_AM_ROOT=0 - - id nobody > /dev/null --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - NOBODY_ID=1 - fi - - id bin > /dev/null --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - BIN_ID=1 - fi - - id daemon > /dev/null --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - DAEMON_ID=1 - fi - - grep -q ^nobody: /etc/group --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - NOBODY_GRP=1 - fi - - grep -q ^bin: /etc/group --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - BIN_GRP=1 - fi - - grep -q ^daemon: /etc/group --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - DAEMON_GRP=1 - fi - - grep -q ^users: /etc/group --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - USERS_GRP=1 - fi - - grep -q ^sys: /etc/group --if [ $? != "0" ]; then -+if [ "$?" != "0" ]; then - SYS_GRP=1 - fi - - whoami | grep root > /dev/null --if [ $? == "0" ]; then -+if [ "$?" == "0" ]; then - I_AM_ROOT=1 - fi - - if [ -n "$CREATE" ]; then - echo "CREATE variable set to $CREATE ..." - else -- if [ $NOBODY_ID != "0" ] || [ $BIN_ID != "0" ] || [ $DAEMON_ID != "0" ] || [ $NOBODY_GRP != "0" ] || [ $BIN_GRP != "0" ] || [ $DAEMON_GRP != "0" ] || [ $USERS_GRP != "0" ] || [ $SYS_GRP != "0" ] && [ $I_AM_ROOT != "0" ]; -+ if [ "$NOBODY_ID" != "0" ] || [ "$BIN_ID" != "0" ] || [ "$DAEMON_ID" != "0" ] || [ "$NOBODY_GRP" != "0" ] || [ "$BIN_GRP" != "0" ] || [ "$DAEMON_GRP" != "0" ] || [ "$USERS_GRP" != "0" ] || [ "$SYS_GRP" != "0" ] && [ "$I_AM_ROOT" != "0" ]; - then - echo -n "If any required user ids and/or groups are missing, would you like these created? Y/N " - read ans -@@ -107,71 +107,71 @@ - fi - fi - --if [ $NOBODY_ID != "1" ] && [ $NOBODY_GRP != "1" ]; then -+if [ "$NOBODY_ID" != "1" ] && [ "$NOBODY_GRP" != "1" ]; then - echo "Nobody user id and group exist." - else -- if [ $NOBODY_ID -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$NOBODY_ID" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo nobody:x:99:99:Nobody:: >> /etc/passwd - fi -- if [ $NOBODY_GRP -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$NOBODY_GRP" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo nobody:x:`id -u nobody`: >> /etc/group - fi - fi - --if [ $BIN_ID != "1" ] && [ $BIN_GRP != "1" ]; then -+if [ "$BIN_ID" != "1" ] && [ "$BIN_GRP" != "1" ]; then - echo "Bin user id and group exist." - else -- if [ $BIN_ID -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$BIN_ID" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo bin:x:1:1:bin:: >> /etc/passwd - fi -- if [ $BIN_GRP -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$BIN_GRP" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo bin:x:`id -u bin`:bin >> /etc/group - fi - fi - --if [ $DAEMON_ID -ne "1" ] && [ $DAEMON_GRP -ne "1" ]; then -+if [ "$DAEMON_ID" -ne "1" ] && [ "$DAEMON_GRP" -ne "1" ]; then - echo "Daemon user id and group exist." - else -- if [ $DAEMON_ID -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$DAEMON_ID" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo daemon:x:2:2:daemon:: >> /etc/passwd - fi -- if [ $DAEMON_GRP -eq "1" ] && [ $CREATE -eq "1" ]; then -+ if [ "$DAEMON_GRP" -eq "1" ] && [ "$CREATE" -eq "1" ]; then - echo daemon:x:`id -u daemon`:daemon >> /etc/group - fi - fi - --if [ $USERS_GRP -ne "1" ]; then -+if [ "$USERS_GRP" -ne "1" ]; then - echo "Users group exists." - else -- if [ $CREATE -eq "1" ]; then -+ if [ "$CREATE" -eq "1" ]; then - echo users:x:100: >> /etc/group - fi - fi - --if [ $SYS_GRP -ne "1" ]; then -+if [ "$SYS_GRP" -ne "1" ]; then - echo "Sys group exists." - else -- if [ $CREATE -eq "1" ]; then -+ if [ "$CREATE" -eq "1" ]; then - echo sys:x:3: >> /etc/group - fi - fi - - id nobody > /dev/null --if [ $? -eq "0" ]; then -+if [ "$?" -eq "0" ]; then - id bin > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - id daemon > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - id -g nobody > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - id -g bin > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - id -g daemon > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - grep users /etc/group | cut -d: -f1 | grep users > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - grep sys /etc/group | cut -d: -f1 | grep sys > /dev/null -- if [ $? -eq "0" ]; then -+ if [ "$?" -eq "0" ]; then - echo "Required users/groups exist." - exit 0 - fi diff --git a/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck.diff b/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck.diff new file mode 100644 index 000000000..dcf0cb07c --- /dev/null +++ b/patches/ltp-full-20080229/generic/ltp-full-20080229-idcheck.diff @@ -0,0 +1,26 @@ +From: Robert Schwebel <r.schwebel@pengutronix.de> +Subject: fix undefined variable + +When CREATE is not set there is no default, so it is possible to run +into the test(1) statement in line 116 with an undefined CREATE, which +lets test break. + +Signed-off-by: Robert Schwebel <r.schwebel@pengutronix.de> + +--- + IDcheck.sh | 2 ++ + 1 file changed, 2 insertions(+) + +Index: ltp-full-20080229/IDcheck.sh +=================================================================== +--- ltp-full-20080229.orig/IDcheck.sh 2008-03-09 13:35:35.000000000 +0100 ++++ ltp-full-20080229/IDcheck.sh 2008-03-09 13:35:55.000000000 +0100 +@@ -104,6 +104,8 @@ + CREATE=0 + ;; + esac ++ else ++ CREATE=0 + fi + fi + diff --git a/patches/ltp-full-20080229/generic/series b/patches/ltp-full-20080229/generic/series index 2c1a29629..de97d7c5a 100644 --- a/patches/ltp-full-20080229/generic/series +++ b/patches/ltp-full-20080229/generic/series @@ -7,4 +7,5 @@ ltp-full-20080131-fadvise.diff ltp-full-20080229-async_handler_pthread_h.diff ltp-full-20080229-realtime-compiler.diff ltp-full-20080229-kernel-compiler.diff -ltp-full-20080229-idcheck-quoting.diff +ltp-full-20080229-idcheck.diff + |