Happy New Year people !
submitqc is a great script, a very useful tool that saves us lots of trouble.
I've been making extensions by following the instructions on wiki.
http://wiki.tinycorelinux.net/wiki:creating_extensionssudo chown -R root:staff /tmp/package/usr/local/tce.installed
sudo chmod -R 775 /tmp/package/usr/local/tce.installed
However, every time I make an extension, I get the "wrongstartscriptperms" message.
I never take much heed since the script "fixes" the permission automatically.
Today, however, I got curious and checked the script.
tc@box:~$ head -n 619 /usr/local/bin/submitqc | tail -n 71
# if ext has a startup file, check startup name, permissions, location, etc.
checkstartup() {
echo -n "${BLUE}${SCRIPT}: ${F} startup files ok? ${NORMAL}"
if [ ! -d usr/local/tce.installed/ ]; then
echo "${GREEN}None present. Ok, I think.${NORMAL}"
return # no startup script
fi
# count files in startup script dir; get name of startup script
SSDIR="usr/local/tce.installed/"
SS="$(ls -A $SSDIR)"
COUNT="$(echo "$SS" | wc -l)"
# is there only 1 startup file, named same as extension?
case $COUNT in
0) echo -e "${RED}Has startup folder but no script. Repair manually.${NORMAL}"
echo -e "${F}: startup folder without script. Repair manually." \
>> /tmp/submitqc/startupscript
;;
1) if [ "${SS}" != "${BASENAME}" ]; then
echo -ne "\n${YELLOW}script name ($SS) is incorrect. Renaming ${BASENAME}. ${NORMAL}"
echo "$F startup named $SS renamed $BASENAME" >> /tmp/submitqc/wrongstartscriptname
SS="$(find $SSDIR -not -type d | tail -n 1)"
mv "${SS}" "${SSDIR}${BASENAME}"
echo "${YELLOW}Done.${NORMAL}"
CHANGES=1
fi
;;
*) echo -e "${RED}Multiple startup files, none named $F. Repair manually.${NORMAL}"
echo -e "${F}: multiple startup files, none named $F. Repair manually." \
>> /tmp/submitqc/startupscript
;;
esac
DIRERROR=
if [ ! "$(stat -c%a ${SSDIR})" = 775 ]; then
sudo chmod 775 "usr/local/tce.installed"
echo -ne "\n\t${YELLOW}Startup directory permissions were corrected.${NORMAL}"
DIRERROR=1
fi
if [ "$(stat -c'%U %G' ${SSDIR})" != "root staff" ]; then
sudo chown root:staff "${SSDIR}"
echo -ne "\n\t${YELLOW}Startup directory ownership was corrected.${NORMAL}"
DIRERROR=1
fi
if [ ! "$(stat -c%a ${SSDIR}/$BASENAME)" = 755 ]; then
sudo chmod 755 "${SSDIR}/$BASENAME"
echo -ne "\n\t${YELLOW}Startup script permissions were corrected.${NORMAL}"
DIRERROR=1
fi
if [ ! "$(stat -c'%U %G' ${SSDIR}/$BASENAME)" = "tc staff" ]; then
sudo chown tc:staff "${SSDIR}/$BASENAME"
echo -ne "\n\t${YELLOW}Startup script ownership was corrected.${NORMAL}"
DIRERROR=1
fi
if [ $DIRERROR ]; then
echo "$F" >> /tmp/submitqc/wrongstartscriptperms
CHANGES=1
echo
else
echo "${GREEN}Ok.${NORMAL}"
fi
} # end checkstartup()
"tce.installed" --> "drwxrwxr-x root:staff"
"start-up-script" --> "-rwxr-xr-x tc:staff"
I thought their owner should both be "root:staff"
with permission "775"
while every thing else as "root:root"
I'm confused.
P.S.
I'm on x86_64 and the submitqc.tcz.md5.txt look like this:
7b157080f71142c84a5faf2cc66b3308 submitqc.tcz
Most extensions on repo have this problem