useradd now uses link rather than rename

This commit is contained in:
Nicolas François 2014-09-20 22:35:21 +02:00
parent 1b4db814ea
commit a7f8176be6
2 changed files with 4 additions and 4 deletions

View File

@ -1,2 +1,2 @@
rename FAILURE /etc/default/useradd /etc/default/useradd-
useradd: rename: /etc/default/useradd: Input/output error
link FAILURE /etc/default/useradd /etc/default/useradd-
useradd: Cannot create backup file (/etc/default/useradd-): Input/output error

View File

@ -7,7 +7,7 @@ cd $(dirname $0)
. ../../../common/config.sh
. ../../../common/log.sh
log_start "$0" "useradd reports failure to write /etc/gshadow"
log_start "$0" "useradd reports failure to create backup /etc/default/useradd-"
save_config
@ -17,7 +17,7 @@ trap 'log_status "$0" "FAILURE"; restore_config' 0
change_config
echo -n "Set default value (useradd -D -g 10)..."
LD_PRELOAD=../../../common/rename_failure.so FAILURE_PATH=/etc/default/useradd- useradd -D -g 10 2>tmp/useradd.err && exit 1 || {
LD_PRELOAD=../../../common/link_failure.so FAILURE_PATH=/etc/default/useradd- useradd -D -g 10 2>tmp/useradd.err && exit 1 || {
status=$?
}
echo "OK"