kiss: Fix directory permissions
This commit is contained in:
parent
a80eb5a2b0
commit
4e196bb09c
19
kiss
19
kiss
|
@ -826,13 +826,24 @@ pkg_install_files() {
|
||||||
# The 'test' will run with '-e' for no-overwrite and '-z'
|
# The 'test' will run with '-e' for no-overwrite and '-z'
|
||||||
# for overwrite.
|
# for overwrite.
|
||||||
case $line in /etc/*) ;;
|
case $line in /etc/*) ;;
|
||||||
*/) [ -d "$line" ] ||
|
*/)
|
||||||
install -o root -g root -m "$rwx" \
|
# Skip directories if they already exist in the file system.
|
||||||
-d "$KISS_ROOT/$line" ;;
|
# (Think /usr/bin, /usr/lib, etc).
|
||||||
|
[ -d "$line" ] ||
|
||||||
|
install -o root -g root -m "$rwx" -d "$KISS_ROOT/$line"
|
||||||
|
|
||||||
|
# Strip setgid/setsid from directories to avoid
|
||||||
|
# absolute and utter chaos.
|
||||||
|
chmod -s "$KISS_ROOT/$line"
|
||||||
|
;;
|
||||||
|
|
||||||
*) test "$1" "$KISS_ROOT/$line" ||
|
*) test "$1" "$KISS_ROOT/$line" ||
|
||||||
|
|
||||||
|
# Treat symlinks differently as the 'install' command
|
||||||
|
# will resolve them (we don't want this).
|
||||||
if [ -h "$2/$line" ]; then
|
if [ -h "$2/$line" ]; then
|
||||||
|
# Skip symlinks which already exist as directories.
|
||||||
|
# (Think baselayout being updated)
|
||||||
[ -d "$KISS_ROOT/$line" ] && continue
|
[ -d "$KISS_ROOT/$line" ] && continue
|
||||||
|
|
||||||
cp -fPp "$2/$line" "${line%/*}"
|
cp -fPp "$2/$line" "${line%/*}"
|
||||||
|
@ -1354,7 +1365,7 @@ args() {
|
||||||
l|list) pkg_list "$@" ;;
|
l|list) pkg_list "$@" ;;
|
||||||
u|update) pkg_updates ;;
|
u|update) pkg_updates ;;
|
||||||
s|search) for pkg do pkg_find "$pkg" all; done ;;
|
s|search) for pkg do pkg_find "$pkg" all; done ;;
|
||||||
v|version) printf '1.12.1\n' ;;
|
v|version) printf '1.12.2\n' ;;
|
||||||
|
|
||||||
h|help|-h|--help|'')
|
h|help|-h|--help|'')
|
||||||
log 'kiss [a|b|c|i|l|r|s|u|v] [pkg] [pkg] [pkg]'
|
log 'kiss [a|b|c|i|l|r|s|u|v] [pkg] [pkg] [pkg]'
|
||||||
|
|
Loading…
Reference in New Issue