1
0
mirror of https://github.com/azlux/log2ram.git synced 2023-10-10 13:37:24 +02:00

shellcheck typo

typo for #32
This commit is contained in:
azlux 2018-02-16 00:55:45 +01:00
parent 9c774dcbb7
commit e439c5ffdd
3 changed files with 5 additions and 5 deletions

View File

@ -3,7 +3,7 @@
[ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!" [ -d /var/hdd.log ] && echo "ERROR: log2ram still installed. Uninstall first!"
[ -d /var/hdd.log ] && exit 1 [ -d /var/hdd.log ] && exit 1
if [ `id -u` -eq 0 ] if [ $(id -u) -eq 0 ]
then then
cp log2ram.service /etc/systemd/system/log2ram.service cp log2ram.service /etc/systemd/system/log2ram.service
chmod 644 /etc/systemd/system/log2ram.service chmod 644 /etc/systemd/system/log2ram.service

View File

@ -27,7 +27,7 @@ syncToDisk () {
syncFromDisk () { syncFromDisk () {
isSafe isSafe
if [ ! -z `du -sh -t $SIZE $HDD_LOG/ | cut -f1` ]; then if [ ! -z "$(du -sh -t "$SIZE" $HDD_LOG/ | cut -f1)" ]; then
echo "ERROR: RAM disk too small. Can't sync." echo "ERROR: RAM disk too small. Can't sync."
umount -l $RAM_LOG/ umount -l $RAM_LOG/
umount -l $HDD_LOG/ umount -l $HDD_LOG/
@ -45,7 +45,7 @@ syncFromDisk () {
} }
wait_for () { wait_for () {
while ! grep -qs $1 /proc/mounts; do while ! grep -qs "$1" /proc/mounts; do
sleep 0.1 sleep 0.1
done done
} }
@ -56,7 +56,7 @@ case "$1" in
mount --bind $RAM_LOG/ $HDD_LOG/ mount --bind $RAM_LOG/ $HDD_LOG/
mount --make-private $HDD_LOG/ mount --make-private $HDD_LOG/
wait_for $HDD_LOG wait_for $HDD_LOG
mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size=$SIZE log2ram $RAM_LOG/ mount -t tmpfs -o nosuid,noexec,nodev,mode=0755,size="$SIZE" log2ram $RAM_LOG/
wait_for $RAM_LOG wait_for $RAM_LOG
syncFromDisk syncFromDisk
;; ;;

View File

@ -1,6 +1,6 @@
#!/bin/sh #!/bin/sh
if [ `id -u` -eq 0 ] if [ $(id -u) -eq 0 ]
then then
service log2ram stop service log2ram stop
systemctl disable log2ram systemctl disable log2ram